JaCoP.set.core
Class SetDomainValueEnumeration

java.lang.Object
  extended by JaCoP.core.ValueEnumeration
      extended by JaCoP.set.core.SetDomainValueEnumeration

public class SetDomainValueEnumeration
extends ValueEnumeration

Defines a methods for enumerating values contained in the SetDomain.

Version:
3.1
Author:
Robert Ã…kemalm

Constructor Summary
SetDomainValueEnumeration(SetDomain dom)
           
 
Method Summary
 void domainHasChanged()
          This function is called to inform enumeration of the change of the domain it enumerates over.
 boolean hasMoreElements()
          It checks if the value enumeration has more elements.
 int nextElement()
          The function nextElement has to return a Set.
 IntDomain nextSetElement()
          Returns the next element in the SetDomain.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetDomainValueEnumeration

public SetDomainValueEnumeration(SetDomain dom)
Parameters:
dom - It specifies the SetDomain for which enumeration of sets is performed.
Method Detail

hasMoreElements

public boolean hasMoreElements()
Description copied from class: ValueEnumeration
It checks if the value enumeration has more elements.

Specified by:
hasMoreElements in class ValueEnumeration
Returns:
true if more elements can be enumerated, false otherwise.

nextElement

public int nextElement()
The function nextElement has to return a Set. Use nextSetElement instead.

Specified by:
nextElement in class ValueEnumeration
Returns:
the next element.

nextSetElement

public IntDomain nextSetElement()
Returns the next element in the SetDomain.

Returns:
the next element in the SetDomain.

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 class ValueEnumeration