Class Entities.MapIntMap

    • Constructor Summary

      Constructors 
      Constructor Description
      MapIntMap​(java.util.Map nameToValue, java.util.Map valueToName)
      Construct a new instance with specified maps.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.lang.String name, int value)
      Add an entry to this entity map.
      java.lang.String name​(int value)
      Returns the name of the entity identified by the specified value.
      int value​(java.lang.String name)
      Returns the value of the entity identified by the specified name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • mapNameToValue

        protected final java.util.Map mapNameToValue
      • mapValueToName

        protected final java.util.Map mapValueToName
    • Constructor Detail

      • MapIntMap

        MapIntMap​(java.util.Map nameToValue,
                  java.util.Map valueToName)
        Construct a new instance with specified maps.
        Parameters:
        nameToValue - name to value map
        valueToName - value to namee map
    • Method Detail

      • add

        public void add​(java.lang.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 java.lang.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​(java.lang.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