JaCoP.core
Class ValueEnumeration

java.lang.Object
  extended by JaCoP.core.ValueEnumeration
Direct Known Subclasses:
BoundDomainValueEnumeration, IntervalDomainValueEnumeration, SetDomainValueEnumeration, SmallDenseDomainValueEnumeration

public abstract class ValueEnumeration
extends java.lang.Object

Defines a methods for enumerating values contained in the domain.

Version:
3.1
Author:
Radoslaw Szymanek and Krzysztof Kuchcinski

Constructor Summary
ValueEnumeration()
           
 
Method Summary
abstract  void domainHasChanged()
          This function is called to inform enumeration of the change of the domain it enumerates over.
abstract  boolean hasMoreElements()
          It checks if the value enumeration has more elements.
abstract  int nextElement()
          It returns the next element in the enumeration.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueEnumeration

public ValueEnumeration()
Method Detail

hasMoreElements

public abstract boolean hasMoreElements()
It checks if the value enumeration has more elements.

Returns:
true if more elements can be enumerated, false otherwise.

nextElement

public abstract int nextElement()
It returns the next element in the enumeration.

Returns:
the next element.

domainHasChanged

public abstract void domainHasChanged()
This function is called to inform enumeration of the change of the domain it enumerates over. The enumeration will update its private data structure and if possible adapt next element to the closest (on the right) which is still in the domain.