lp.struct.util
Class EvolpPrettyPrinter.MutableInteger

java.lang.Object
  extended by lp.struct.util.EvolpPrettyPrinter.MutableInteger
Enclosing class:
EvolpPrettyPrinter<W extends Writer>

private static class EvolpPrettyPrinter.MutableInteger
extends Object

A wrapper class for a mutable integer.


Field Summary
private  int value
          The integer value.
 
Constructor Summary
EvolpPrettyPrinter.MutableInteger(int initialValue)
          Constructs a new instance that initially holds the value initialValue.
 
Method Summary
 void decrement()
          Subtracts 1 from the current value.
 int getValue()
          Returns the current value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

private int value
The integer value.

Constructor Detail

EvolpPrettyPrinter.MutableInteger

public EvolpPrettyPrinter.MutableInteger(int initialValue)
Constructs a new instance that initially holds the value initialValue.

Parameters:
initialValue - the initial value for the new instance
Method Detail

getValue

public int getValue()
Returns the current value.

Returns:
an integer with the current value

decrement

public void decrement()
Subtracts 1 from the current value.