Package org.jacop.core
Class BoundDomainIntervalEnumeration
java.lang.Object
org.jacop.core.IntervalEnumeration
org.jacop.core.BoundDomainIntervalEnumeration
- All Implemented Interfaces:
Enumeration<Interval>
Defines a methods for enumerating intervals contained in the BoundDomain. It
implements the interface IntervalEnumeration. It always returns only one
interval as BoundDomain by definition is specified by one interval.
- Version:
- 4.8
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBoundDomainIntervalEnumeration
(int min, int max) It creates an enumeration of intervals for BoundDomain. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Enumeration
asIterator
-
Field Details
-
i
Interval i -
done
boolean done
-
-
Constructor Details
-
BoundDomainIntervalEnumeration
public BoundDomainIntervalEnumeration(int min, int max) It creates an enumeration of intervals for BoundDomain.- Parameters:
min
- the left bound of the BoundDomain.max
- the right bound of the BoundDomain.
-
-
Method Details
-
hasMoreElements
public boolean hasMoreElements()- Specified by:
hasMoreElements
in interfaceEnumeration<Interval>
- Specified by:
hasMoreElements
in classIntervalEnumeration
- Returns:
- true if there are more elements to enumerate.
-
nextElement
- Specified by:
nextElement
in interfaceEnumeration<Interval>
- Specified by:
nextElement
in classIntervalEnumeration
- Returns:
- next interval.
-