All Packages Class Hierarchy This Package Previous Next Index
Class dlib.NameDB
java.lang.Object
|
+----dlib.BaseObject
|
+----dlib.NamedObject
|
+----dlib.NameDB
- public class NameDB
- extends NamedObject
This class is a simple repository of correspondances between Strings and numbers. It's
intended usage is to ameliorate the brain damage caused by Java's lack of "enum" types.
In truth, it should be used only for objects whose representation you do not control.
For objects you control, it's much better to use static variables derived from
type NamedObject
- See Also:
- JavaNames, NamedObject
-
AddName(String, int)
- use this method to build a table of names
-
AddName(String, Object)
- use this method to build a table of names
-
FindName(int)
- find the name associated with a number, or return null
-
FindName(Integer)
- find the name associated with an Integer (boxed number), or return null
-
FindNumber(String)
- find the Integer associated with name
FindName
public Object FindName(int number)
- find the name associated with a number, or return null
FindName
public Object FindName(Integer number)
- find the name associated with an Integer (boxed number), or return null
FindNumber
public Object FindNumber(String name)
- find the Integer associated with name
AddName
public void AddName(String s,
int n)
- use this method to build a table of names
AddName
public void AddName(String s,
Object n)
- use this method to build a table of names
All Packages Class Hierarchy This Package Previous Next Index