Class ValueEnumeration

java.lang.Object
org.jacop.core.ValueEnumeration
Direct Known Subclasses:
BoundDomainValueEnumeration, IntervalDomainValueEnumeration, SetDomainValueEnumeration, SmallDenseDomainValueEnumeration

public abstract class ValueEnumeration extends Object
Defines a methods for enumerating values contained in the domain.
Version:
4.9
  • 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.