jopt.csp.variable
Interface CspGenericConstant

All Known Subinterfaces:
CspGenericBooleanConstant, CspGenericDoubleConstant, CspGenericFloatConstant, CspGenericIntConstant, CspGenericLongConstant, CspGenericNumConstant

public interface CspGenericConstant

Interface for CspGenericConstant objects

Author:
jboerkoel

Method Summary
 boolean containsIndex(CspGenericIndex index)
          Returns true if this generic constant contains the given index
 int getConstantCount()
          Returns the number of constants in this generic constant
 CspGenericIndex[] getIndices()
          Returns the set of indices used to index this constant
 void setIndicesToNodeOffset(int offset)
          Set the indices used to index the constants to represent the specified offset
 java.lang.String toString()
          Displays the name of this generic constant along with its indices
 

Method Detail

getIndices

public CspGenericIndex[] getIndices()
Returns the set of indices used to index this constant

Returns:
array of indices that this generic constant is indexed over

getConstantCount

public int getConstantCount()
Returns the number of constants in this generic constant

Returns:
number of constants in this generic constant

containsIndex

public boolean containsIndex(CspGenericIndex index)
Returns true if this generic constant contains the given index

Returns:
true if this generic constant contains the given index

toString

public java.lang.String toString()
Displays the name of this generic constant along with its indices

Returns:
string representing the name of this generic constant

setIndicesToNodeOffset

public void setIndicesToNodeOffset(int offset)
Set the indices used to index the constants to represent the specified offset

Parameters:
offset - offset to which to set the indices