Package org.apache.commons.lang
Class Entities.PrimitiveEntityMap
- java.lang.Object
-
- org.apache.commons.lang.Entities.PrimitiveEntityMap
-
- All Implemented Interfaces:
Entities.EntityMap
- Direct Known Subclasses:
Entities.LookupEntityMap
- Enclosing class:
- Entities
static class Entities.PrimitiveEntityMap extends java.lang.Object implements Entities.EntityMap
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.MapmapNameToValueprivate IntHashMapmapValueToName
-
Constructor Summary
Constructors Constructor Description PrimitiveEntityMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(java.lang.String name, int value)Add an entry to this entity map.java.lang.Stringname(int value)Returns the name of the entity identified by the specified value.intvalue(java.lang.String name)Returns the value of the entity identified by the specified name.
-
-
-
Field Detail
-
mapNameToValue
private final java.util.Map mapNameToValue
-
mapValueToName
private final IntHashMap mapValueToName
-
-
Method Detail
-
add
public void add(java.lang.String name, int value)Add an entry to this entity map.
- Specified by:
addin interfaceEntities.EntityMap- Parameters:
name- the entity namevalue- the entity value
-
name
public java.lang.String name(int value)
Returns the name of the entity identified by the specified value.
- Specified by:
namein interfaceEntities.EntityMap- Parameters:
value- the value to locate- Returns:
- entity name associated with the specified value
-
value
public int value(java.lang.String name)
Returns the value of the entity identified by the specified name.
- Specified by:
valuein interfaceEntities.EntityMap- Parameters:
name- the name to locate- Returns:
- entity value associated with the specified name
-
-