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

Method Index

 o AddName(String, int)
use this method to build a table of names
 o AddName(String, Object)
use this method to build a table of names
 o FindName(int)
find the name associated with a number, or return null
 o FindName(Integer)
find the name associated with an Integer (boxed number), or return null
 o FindNumber(String)
find the Integer associated with name

Methods

 o FindName
 public Object FindName(int number)
find the name associated with a number, or return null

 o FindName
 public Object FindName(Integer number)
find the name associated with an Integer (boxed number), or return null

 o FindNumber
 public Object FindNumber(String name)
find the Integer associated with name

 o AddName
 public void AddName(String s,
                     int n)
use this method to build a table of names

 o 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