Class Inventory.CounterNode

java.lang.Object
VASSAL.build.module.Inventory.CounterNode
All Implemented Interfaces:
Comparable<Inventory.CounterNode>
Enclosing class:
Inventory

public class Inventory.CounterNode extends Object implements Comparable<Inventory.CounterNode>
CounterNode for the result tree.
Author:
spindler
  • Field Details

  • Constructor Details

  • Method Details

    • toString

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

      protected String separator()
      Places a separator between elements. The separator consists of an indent and a linebreak.
      Returns:
    • toResultString

      public String toResultString()
    • getEntry

      public String getEntry()
    • getCounter

      public Inventory.Counter getCounter()
    • addChild

      public void addChild(Inventory.CounterNode counterNode, boolean sort)
    • addChild

      public void addChild(int i, Inventory.CounterNode counterNode, boolean sort)
    • sortChildren

      protected void sortChildren()
    • removeChild

      public void removeChild(Inventory.CounterNode child)
    • getChildCount

      public int getChildCount()
    • isLeaf

      public boolean isLeaf()
    • getChild

      public Object getChild(int index)
    • getIndexOfChild

      public int getIndexOfChild(Object child)
    • getLevel

      public int getLevel()
    • setLevel

      public void setLevel(int level)
    • updateValues

      public int updateValues()
    • iterator

      public Iterator<Inventory.CounterNode> iterator()
    • cutLevel

      public void cutLevel(int cut)
    • cutLeaves

      public void cutLeaves()
    • compareTo

      public int compareTo(Inventory.CounterNode node)
      Compare this CounterNode to another one based on the respective SortKeys.
      Specified by:
      compareTo in interface Comparable<Inventory.CounterNode>
    • toSortKey

      protected String toSortKey()
      Sort this CounterNode by the counters key, if no counter use the label. If no children, use the name of the counterNode, probably could be $PropertyValue$ as well?
      Returns:
      key as String