Package VASSAL.build.module
Class Inventory.Counter
java.lang.Object
VASSAL.build.module.Inventory.Counter
- All Implemented Interfaces:
PropertySource
- Enclosing class:
- Inventory
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 Summary
Modifier and TypeFieldDescriptionprotected FormattedString
protected String
protected Inventory.CounterNode
protected GamePiece
protected FormattedString
protected GamePiece
protected int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getLocalizedProperty(Object key)
Returns a localized translation of the specified property value, if available.getName()
String[]
getPath()
getPiece()
getProperty(Object key)
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.int
getValue()
int
hashCode()
void
setNode(Inventory.CounterNode node)
void
void
setValue(int value)
toString()
-
Field Details
-
piece
-
source
-
groups
-
value
protected int value -
localName
-
format
-
sortingFormat
-
node
-
-
Constructor Details
-
Counter
-
Counter
-
Counter
-
-
Method Details
-
getName
-
hashCode
public int hashCode() -
toString
-
toSortKey
-
getPath
-
getValue
public int getValue() -
setValue
public void setValue(int value) -
getPiece
-
setPiece
-
equals
-
getProperty
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 interfacePropertySource
- Parameters:
key
- String key of property to be returned- Returns:
- Object containing value of the specified property
-
getLocalizedProperty
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 interfacePropertySource
- 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
-