Package org.jacop.core
Class ValueEnumeration
java.lang.Object
org.jacop.core.ValueEnumeration
- Direct Known Subclasses:
BoundDomainValueEnumeration
,IntervalDomainValueEnumeration
,SetDomainValueEnumeration
,SmallDenseDomainValueEnumeration
Defines a methods for enumerating values contained in the domain.
- Version:
- 4.8
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
This function is called to inform enumeration of the change of the domain it enumerates over.abstract boolean
It checks if the value enumeration has more elements.abstract int
It returns the next element in the enumeration.
-
Constructor Details
-
ValueEnumeration
public ValueEnumeration()
-
-
Method Details
-
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.
-