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
FieldsModifier and TypeFieldDescriptionprotected FormattedStringprotected Stringprotected Inventory.CounterNodeprotected GamePieceprotected FormattedStringprotected GamePieceprotected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetLocalizedProperty(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.intgetValue()inthashCode()voidsetNode(Inventory.CounterNode node)voidvoidsetValue(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:PropertySourceWhen 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:
getPropertyin interfacePropertySource- Parameters:
key- String key of property to be returned- Returns:
- Object containing value of the specified property
-
getLocalizedProperty
Description copied from interface:PropertySourceReturns a localized translation of the specified property value, if available. Otherwise returns the non-localized version.- Specified by:
getLocalizedPropertyin 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
-