jopt.csp.spi.arcalgorithm.domain
Class LongIntervalDomain

java.lang.Object
  extended byjopt.csp.spi.arcalgorithm.domain.AbstractDomain
      extended byjopt.csp.spi.arcalgorithm.domain.BaseNumDomain
          extended byjopt.csp.spi.arcalgorithm.domain.BaseLongDomain
              extended byjopt.csp.spi.arcalgorithm.domain.LongIntervalDomain
All Implemented Interfaces:
ChoicePointDataSource, ChoicePointEntryListener, Domain, DomainChangeSource, LongDomain, jopt.csp.util.LongIntervalSetListener, NumDomain

public class LongIntervalDomain
extends BaseLongDomain
implements jopt.csp.util.LongIntervalSetListener

Long domain that stores data in interval objects


Constructor Summary
LongIntervalDomain(long min, long max)
          Constructor
 
Method Summary
 void afterChoicePointPopEvent()
          Indicates that the current choice point has been rolled back and domain data must be reset
 void afterChoicePointPushEvent()
          Indicates that current choice point has been updated and domain data must be restored
 void beforeChoicePointPopEvent()
          Indicates that the current choice point is about to be rolled back and domain data must be reset
 void beforeChoicePointPushEvent()
          Indicates that current choice point is about to be pushed to allow data to be recorded in stack
 boolean choicePointStackSet()
          Returns true if a call to setChoicePointStack will fail
 java.lang.Object clone()
          Returns a copy of this domain
 void intervalAdded(int callback, long start, long end)
           
 void intervalRemoved(int callback, long start, long end)
           
 void setChoicePointStack(ChoicePointStack cps)
          Sets the choicepoint stack associated with this domain.
 
Methods inherited from class jopt.csp.spi.arcalgorithm.domain.BaseLongDomain
dump, getMax, getMin, getNextHigher, getNextLower, isBound, isInDomain, removeDomain, removeRange, removeValue, setDomain, setMax, setMin, setRange, setValue
 
Methods inherited from class jopt.csp.spi.arcalgorithm.domain.BaseNumDomain
clearDelta, deltaValues, getDeltaSet, getDomainState, getSize, isNestedChild, restoreDomainState, setNestedChild, toSet, toString, values
 
Methods inherited from class jopt.csp.spi.arcalgorithm.domain.AbstractDomain
addDomainChangeListener, addRangeChangeListener, addValueChangeListener, changed, removeDomainChangeListener, removeRangeChangeListener, removeValueChangeListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jopt.csp.spi.arcalgorithm.domain.NumDomain
deltaValues, getDeltaSet, getSize, toSet, values
 
Methods inherited from interface jopt.csp.spi.arcalgorithm.domain.Domain
changed, clearDelta, getDomainState, restoreDomainState
 

Constructor Detail

LongIntervalDomain

public LongIntervalDomain(long min,
                          long max)
Constructor

Method Detail

intervalAdded

public void intervalAdded(int callback,
                          long start,
                          long end)
Specified by:
intervalAdded in interface jopt.csp.util.LongIntervalSetListener

intervalRemoved

public void intervalRemoved(int callback,
                            long start,
                            long end)
Specified by:
intervalRemoved in interface jopt.csp.util.LongIntervalSetListener

clone

public java.lang.Object clone()
Description copied from interface: Domain
Returns a copy of this domain

Specified by:
clone in interface Domain
Specified by:
clone in class BaseNumDomain

setChoicePointStack

public final void setChoicePointStack(ChoicePointStack cps)
Sets the choicepoint stack associated with this domain. Can only be set once

Specified by:
setChoicePointStack in interface ChoicePointDataSource

choicePointStackSet

public final boolean choicePointStackSet()
Returns true if a call to setChoicePointStack will fail

Specified by:
choicePointStackSet in interface ChoicePointDataSource

beforeChoicePointPopEvent

public final void beforeChoicePointPopEvent()
Description copied from interface: ChoicePointEntryListener
Indicates that the current choice point is about to be rolled back and domain data must be reset

Specified by:
beforeChoicePointPopEvent in interface ChoicePointEntryListener

afterChoicePointPopEvent

public void afterChoicePointPopEvent()
Description copied from interface: ChoicePointEntryListener
Indicates that the current choice point has been rolled back and domain data must be reset

Specified by:
afterChoicePointPopEvent in interface ChoicePointEntryListener

beforeChoicePointPushEvent

public final void beforeChoicePointPushEvent()
Description copied from interface: ChoicePointEntryListener
Indicates that current choice point is about to be pushed to allow data to be recorded in stack

Specified by:
beforeChoicePointPushEvent in interface ChoicePointEntryListener

afterChoicePointPushEvent

public final void afterChoicePointPushEvent()
Description copied from interface: ChoicePointEntryListener
Indicates that current choice point has been updated and domain data must be restored

Specified by:
afterChoicePointPushEvent in interface ChoicePointEntryListener