Package org.jacop.core
Class ValueEnumeration
- java.lang.Object
-
- org.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:
- 4.7
-
-
Constructor Summary
Constructors Constructor Description ValueEnumeration()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.
-
-
-
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.
-
-