1 7 8 package javax.sound.sampled; 9 10 27 public abstract class Control { 28 29 30 32 35 private final Type type; 36 37 38 39 41 45 protected Control(Type type) { 46 this.type = type; 47 } 48 49 50 52 56 public Type getType() { 57 return type; 58 } 59 60 61 63 67 public String toString() { 68 return new String (getType() + " Control"); 69 } 70 71 72 77 public static class Type { 78 79 81 83 86 private String name; 87 88 89 91 97 protected Type(String name) { 98 this.name = name; 99 } 100 101 102 104 107 public final boolean equals(Object obj) { 108 return super.equals(obj); 109 } 110 111 114 public final int hashCode() { 115 return super.hashCode(); 116 } 117 118 124 public final String toString() { 125 return name; 126 } 127 } 129 } | Popular Tags |