Package org.jacop.core
Class IntervalDomainValueEnumeration
java.lang.Object
org.jacop.core.ValueEnumeration
org.jacop.core.IntervalDomainValueEnumeration
Defines a methods for enumerating values contain in the domain.
- Version:
- 4.10
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) int(package private) IntervalDomain(package private) Interval(package private) int(package private) int -
Constructor Summary
ConstructorsConstructorDescriptionIt create an enumeration for a given domain. -
Method Summary
Modifier and TypeMethodDescriptionvoidThis function is called to inform enumeration of the change of the domain it enumerates over.booleanIt checks if the value enumeration has more elements.intIt returns the next element in the enumeration.
-
Field Details
-
current
int current -
domain
IntervalDomain domain -
i
Interval i -
intervalNo
int intervalNo -
maxIntervalNo
int maxIntervalNo
-
-
Constructor Details
-
IntervalDomainValueEnumeration
It create an enumeration for a given domain.- Parameters:
dom- domain for which value enumeration is created.
-
-
Method Details
-
hasMoreElements
public boolean hasMoreElements()Description copied from class:ValueEnumerationIt checks if the value enumeration has more elements.- Specified by:
hasMoreElementsin classValueEnumeration- Returns:
- true if more elements can be enumerated, false otherwise.
-
nextElement
public int nextElement()Description copied from class:ValueEnumerationIt returns the next element in the enumeration.- Specified by:
nextElementin classValueEnumeration- Returns:
- the next element.
-
domainHasChanged
public void domainHasChanged()Description copied from class:ValueEnumerationThis 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.- Specified by:
domainHasChangedin classValueEnumeration
-