Package org.jacop.core
Class BoundDomainValueEnumeration
- java.lang.Object
-
- org.jacop.core.ValueEnumeration
-
- org.jacop.core.BoundDomainValueEnumeration
-
public class BoundDomainValueEnumeration extends ValueEnumeration
Defines a methods for enumerating values contained in the BoundDomain.- Version:
- 4.8
-
-
Field Summary
Fields Modifier and Type Field Description (package private) intcurrent(package private) BoundDomaindomain(package private) intmax(package private) intmin
-
Constructor Summary
Constructors Constructor Description BoundDomainValueEnumeration(BoundDomain dom)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddomainHasChanged()This function is called to inform enumeration of the change of the domain it enumerates over.booleanhasMoreElements()It checks if the value enumeration has more elements.intnextElement()It returns the next element in the enumeration.
-
-
-
Field Detail
-
current
int current
-
min
int min
-
max
int max
-
domain
BoundDomain domain
-
-
Constructor Detail
-
BoundDomainValueEnumeration
public BoundDomainValueEnumeration(BoundDomain dom)
- Parameters:
dom- It specifies the BoundDomain for which enumeration of values is performed.
-
-
Method Detail
-
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
-
-