Class CSSCounter

java.lang.Object
ro.sync.ecss.css.CSSCounter
All Implemented Interfaces:
Cloneable

@API(type=NOT_EXTENDABLE, src=PRIVATE) public class CSSCounter extends Object implements Cloneable
A CSS counter identified by it's name.
  • Constructor Details

    • CSSCounter

      public CSSCounter(String name)
      Constructor.
      Parameters:
      name - The name of the counter.
    • CSSCounter

      public CSSCounter(String name, int defaultValue)
      Constructor.
      Parameters:
      name - The name of the counter.
      defaultValue - The default value.
  • Method Details

    • increment

      public void increment(int increment, boolean ignoreNextIncremenet)
      Increment the counter.
      Parameters:
      increment - The increment value.
      ignoreNextIncremenet - true when the current counter is set to an element deleted with track changes, and the next increment should be ignored.
    • increment

      public void increment(int increment)
      Increment the counter.
      Parameters:
      increment - The increment value.
    • reset

      public void reset()
      Reset the counter to the initial value.
    • getValue

      public int getValue()
      Returns:
      The current value of the counter.
    • getName

      public String getName()
      Returns:
      The counter name.
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also:
    • setDefaultValue

      public void setDefaultValue(int defValue)
      Parameters:
      defValue - A default value to be used both as initial and current values.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
      See Also:
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      See Also:
    • clone

      public CSSCounter clone() throws CloneNotSupportedException
      Clones this counter.
      Overrides:
      clone in class Object
      Throws:
      CloneNotSupportedException
      See Also: