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 Object implements Entities.EntityMap
  • Field Details

    • mapNameToValue

      private final Map mapNameToValue
    • mapValueToName

      private final IntHashMap mapValueToName
  • Constructor Details

    • PrimitiveEntityMap

      PrimitiveEntityMap()
  • Method Details

    • add

      public void add(String name, int value)

      Add an entry to this entity map.

      Specified by:
      add in interface Entities.EntityMap
      Parameters:
      name - the entity name
      value - the entity value
    • name

      public String name(int value)

      Returns the name of the entity identified by the specified value.

      Specified by:
      name in interface Entities.EntityMap
      Parameters:
      value - the value to locate
      Returns:
      entity name associated with the specified value
    • value

      public int value(String name)

      Returns the value of the entity identified by the specified name.

      Specified by:
      value in interface Entities.EntityMap
      Parameters:
      name - the name to locate
      Returns:
      entity value associated with the specified name