homedukeAlgorithmen & Datenstrukturen mit Java: ds.util.V Prof. Dr. Uwe Schmidt FH Wedel

ds.util.V

   1package ds.util;
   2
   3/** just an example class
   4    for elements without
   5    any specific properties
   6*/
   7public
   8    class V {
   9
  10    public final int value;
  11
  12    private V(int v) {
  13        value = v;
  14    }
  15    // smart constructor
  16    public static V mkV(int v) {
  17        return
  18            new V(v);
  19    }
  20
  21    public String toString() {
  22        return "" + value;
  23    }
  24
  25}

Die Quelle: V.java


Letzte Änderung: 26.10.2015
© Prof. Dr. Uwe Schmidt
Prof. Dr. Uwe Schmidt FH Wedel