Class Inventory.Counter

java.lang.Object
VASSAL.build.module.Inventory.Counter
All Implemented Interfaces:
PropertySource, Auditable
Enclosing class:
Inventory

public class Inventory.Counter extends Object implements PropertySource
Holds static information of and a reference to a gamepiece. Pay attention to the equals method. It checks if two pieces can be found under the same path!
Author:
Brent Easton and Torsten Spindler
  • Field Details

  • Constructor Details

  • Method Details

    • getName

      public String getName()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toSortKey

      public String toSortKey()
    • getPath

      public String[] getPath()
    • getValue

      public int getValue()
    • setValue

      public void setValue(int value)
    • getPiece

      public GamePiece getPiece()
    • setPiece

      public void setPiece(GamePiece piece)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • getProperty

      public Object getProperty(Object key)
      Description copied from interface: PropertySource
      When using this interface a piece's own properties are preferred to those of "Global Properties", and those in turn are searched Zone-first then Map, then Module.
      Specified by:
      getProperty in interface PropertySource
      Parameters:
      key - String key of property to be returned
      Returns:
      Object containing value of the specified property
    • getLocalizedProperty

      public Object getLocalizedProperty(Object key)
      Description copied from interface: PropertySource
      Returns a localized translation of the specified property value, if available. Otherwise returns the non-localized version.
      Specified by:
      getLocalizedProperty in interface PropertySource
      Parameters:
      key - String key of property to be returned
      Returns:
      Object containing localized text of the specified property, if available, otherwise non-localized value
    • setNode

      public void setNode(Inventory.CounterNode node)