Package org.apache.commons.lang
Class Entities.LookupEntityMap
- java.lang.Object
-
- org.apache.commons.lang.Entities.PrimitiveEntityMap
-
- org.apache.commons.lang.Entities.LookupEntityMap
-
- All Implemented Interfaces:
Entities.EntityMap
- Enclosing class:
- Entities
static class Entities.LookupEntityMap extends Entities.PrimitiveEntityMap
-
-
Field Summary
Fields Modifier and Type Field Description private static int
LOOKUP_TABLE_SIZE
private java.lang.String[]
lookupTable
-
Constructor Summary
Constructors Constructor Description LookupEntityMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
createLookupTable()
Creates an entity lookup table of LOOKUP_TABLE_SIZE elements, initialized with entity names.private java.lang.String[]
lookupTable()
Returns the lookup table for this entity map.java.lang.String
name(int value)
Returns the name of the entity identified by the specified value.-
Methods inherited from class org.apache.commons.lang.Entities.PrimitiveEntityMap
add, value
-
-
-
-
Field Detail
-
lookupTable
private java.lang.String[] lookupTable
-
LOOKUP_TABLE_SIZE
private static final int LOOKUP_TABLE_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
name
public java.lang.String name(int value)
Returns the name of the entity identified by the specified value.
- Specified by:
name
in interfaceEntities.EntityMap
- Overrides:
name
in classEntities.PrimitiveEntityMap
- Parameters:
value
- the value to locate- Returns:
- entity name associated with the specified value
-
lookupTable
private java.lang.String[] lookupTable()
Returns the lookup table for this entity map. The lookup table is created if it has not been previously.
- Returns:
- the lookup table
-
createLookupTable
private void createLookupTable()
Creates an entity lookup table of LOOKUP_TABLE_SIZE elements, initialized with entity names.
-
-