Package org.jacop.core
Class BoundDomainValueEnumeration
java.lang.Object
org.jacop.core.ValueEnumeration
org.jacop.core.BoundDomainValueEnumeration
Defines a methods for enumerating values contained in the BoundDomain.
- Version:
- 4.9
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) int
(package private) BoundDomain
(package private) int
(package private) int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
This function is called to inform enumeration of the change of the domain it enumerates over.boolean
It checks if the value enumeration has more elements.int
It returns the next element in the enumeration.
-
Field Details
-
current
int current -
min
int min -
max
int max -
domain
BoundDomain domain
-
-
Constructor Details
-
BoundDomainValueEnumeration
- Parameters:
dom
- It specifies the BoundDomain for which enumeration of values is performed.
-
-
Method Details
-
hasMoreElements
public boolean hasMoreElements()Description copied from class:ValueEnumeration
It checks if the value enumeration has more elements.- Specified by:
hasMoreElements
in classValueEnumeration
- Returns:
- true if more elements can be enumerated, false otherwise.
-
nextElement
public int nextElement()Description copied from class:ValueEnumeration
It returns the next element in the enumeration.- Specified by:
nextElement
in classValueEnumeration
- Returns:
- the next element.
-
domainHasChanged
public void domainHasChanged()Description copied from class:ValueEnumeration
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.- Specified by:
domainHasChanged
in classValueEnumeration
-