// typesafe enum pattern, no public constructor
// typesafe enum pattern, no public constructor this.name = name; String key = makeKey(name); if(allParameters.containsKey(key)) throw new IllegalArgumentException("Parameter name " + key + " already used!"); allParameters.put(key, this);
return getClass() + " " + name;
Resolves the deserialized instance to the local reference for accurate equals() and == comparisons.returna reference to Parameter as resolved in the local VMthrowsObjectStreamException Object par = allParameters.get(makeKey(name)); if(par == null) throw new StreamCorruptedException("Unknown parameter value: " + name); return par;
Object par = allParameters.get(makeKey(name)); if(par == null) throw new StreamCorruptedException("Unknown parameter value: " + name); return par;
return name;