IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.patterns.framework.util
Class MutableBoolean

java.lang.Object
  extended bycom.ibm.xtools.patterns.framework.util.MutableBoolean

public class MutableBoolean
extends Object

A mutable boolean mainly used for the accumulation of state from local or anonymously defined inner classes into the surrounding context (to be accessed variables of this type must be defined final at point-of-use). A java.lang.Boolean is immutable and therefore cannot be used for this purpose.


Constructor Summary
MutableBoolean()
          Constructs a mutable boolean, which by default is initialized to the value of false
MutableBoolean(boolean value)
          Constructs a mutable boolean with the given value.
 
Method Summary
 void bitwiseOr(boolean booleanValue)
          Bitwise-ORs the given value with the internally stored value of this mutable boolean.
 boolean equals(Object object)
           
 boolean getValue()
          Returns the current value of the internally stored mutable boolean state.
 int hashCode()
           
 void setValue(boolean value)
          Sets the value of this mutable boolean.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MutableBoolean

public MutableBoolean()
Constructs a mutable boolean, which by default is initialized to the value of false


MutableBoolean

public MutableBoolean(boolean value)
Constructs a mutable boolean with the given value.

Parameters:
value - the value the internally stored state of the mutable boolean will be initialized to
Method Detail

bitwiseOr

public void bitwiseOr(boolean booleanValue)
Bitwise-ORs the given value with the internally stored value of this mutable boolean.

Parameters:
booleanValue - value to bitwise-OR with this mutable boolean

equals

public boolean equals(Object object)

getValue

public boolean getValue()
Returns the current value of the internally stored mutable boolean state.

Returns:
the current value of the mutable boolean

hashCode

public int hashCode()

setValue

public void setValue(boolean value)
Sets the value of this mutable boolean.

Parameters:
value - the value to set the mutable boolean to

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2004. All rights reserved.