All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----dlib.BaseObject | +----dlib.NamedObject
for example:
class Cases extends NamedObject { public static final NormalCase = new Cases("normal"); public static final Othercase = new Cases("unusual"); public Cases(String name) { super(name); } }
class Foo implements Cases { public test(Cases thiscase) { if(thiscase == NormalCase) return(true) else return(false); } }
the only downside of this is that you can't use "switch" statements on Cases
public String name
public NamedObject()
public NamedObject(String name)
public String getName()