jopt.csp.variable
Interface CspGenericBooleanConstant

All Superinterfaces:
CspGenericConstant

public interface CspGenericBooleanConstant
extends CspGenericConstant

Interface for CspGenericBooleanConstant objects

Author:
jboerkoel

Method Summary
 boolean contains(boolean bool)
          Returns whether or not the specified boolean is one of the constants contained in this generic constant
 CspGenericBooleanConstant createFragment(CspGenericIndex[] fragIndices)
          Returns a CspGenericBooleanConstant based on the specified indices
 CspGenericBooleanConstant generateBooleanConstant(boolean bool)
          Generates a CspGenericBooleanConstant based on only one boolean value
 boolean[] getBooleanConstants()
          Returns all the constants wrapped by this generic constant return boolean array of all the boolean constants
 boolean getBooleanForIndex()
          Returns the boolean value currently being referenced by the index
 java.lang.String getName()
          Returns a String representing the name of this constant
 boolean isAnyFalse()
          Returns true if any of the Boolean constants are false
 boolean isAnyTrue()
          Returns true if any of the Boolean constants are true
 
Methods inherited from interface jopt.csp.variable.CspGenericConstant
containsIndex, getConstantCount, getIndices, setIndicesToNodeOffset, toString
 

Method Detail

getBooleanForIndex

public boolean getBooleanForIndex()
Returns the boolean value currently being referenced by the index

Returns:
boolean value of the Boolean object currently being referenced by index

isAnyFalse

public boolean isAnyFalse()
Returns true if any of the Boolean constants are false

Returns:
true if any of the generic boolean constants are false

isAnyTrue

public boolean isAnyTrue()
Returns true if any of the Boolean constants are true

Returns:
true if any of the generic boolean constants are true

getName

public java.lang.String getName()
Returns a String representing the name of this constant

Returns:
string representing name of this generic boolean constant

getBooleanConstants

public boolean[] getBooleanConstants()
Returns all the constants wrapped by this generic constant return boolean array of all the boolean constants


contains

public boolean contains(boolean bool)
Returns whether or not the specified boolean is one of the constants contained in this generic constant

Parameters:
bool - boolean value to check if any of the constant values are equivalent to
Returns:
true if one of the constants is equivalent to the value of bool

generateBooleanConstant

public CspGenericBooleanConstant generateBooleanConstant(boolean bool)
Generates a CspGenericBooleanConstant based on only one boolean value

Parameters:
bool - value of the genericBooleanConstant
Returns:
A generic boolean constant with only one value

createFragment

public CspGenericBooleanConstant createFragment(CspGenericIndex[] fragIndices)
Returns a CspGenericBooleanConstant based on the specified indices

Parameters:
fragIndices - indices over which to create the fragment
Returns:
generic boolean constant over the indices passed in the fragIndices[]