org.opengts.util
Class AccumulatorBoolean

java.lang.Object
  extended by org.opengts.util.AccumulatorBoolean

public class AccumulatorBoolean
extends java.lang.Object

Accumulator Boolean container. Typically used in conditions where it is desireable to pass an Boolean to an inner-class and have the value accessible from outside the inner-class. (If the Boolean is to be used from different threads in a multi-threaded environment, use "AtomicBoolean" instead).


Constructor Summary
AccumulatorBoolean()
          Constructor
AccumulatorBoolean(boolean val)
          Constructor
 
Method Summary
 void and(boolean v)
          AND's the specified value with the accumulator
 boolean get()
          Gets the value of the accumulator
 void not()
          NOT's the value of the accumulator
 void or(boolean v)
          OR's the specified value with the accumulator
 void set(boolean v)
          Sets the value of the accumulator
 void xor(boolean v)
          XOR's the specified value with the accumulator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccumulatorBoolean

public AccumulatorBoolean()
Constructor


AccumulatorBoolean

public AccumulatorBoolean(boolean val)
Constructor

Parameters:
val - Initial value
Method Detail

set

public void set(boolean v)
Sets the value of the accumulator

Parameters:
v - The new value

get

public boolean get()
Gets the value of the accumulator

Returns:
The current value

and

public void and(boolean v)
AND's the specified value with the accumulator

Parameters:
v - The value to AND

or

public void or(boolean v)
OR's the specified value with the accumulator

Parameters:
v - The value to OR

xor

public void xor(boolean v)
XOR's the specified value with the accumulator

Parameters:
v - The value to XOR

not

public void not()
NOT's the value of the accumulator