choco.kernel.memory.structure.iterators
Class PSCLEIterator<C extends AbstractSConstraint>

java.lang.Object
  extended by choco.kernel.common.util.disposable.Disposable
      extended by choco.kernel.common.util.iterators.DisposableIterator<Couple<C>>
          extended by choco.kernel.memory.structure.iterators.PSCLEIterator<C>
All Implemented Interfaces:
Iterator<Couple<C>>

public final class PSCLEIterator<C extends AbstractSConstraint>
extends DisposableIterator<Couple<C>>

User : cprudhom
Mail : cprudhom(a)emn.fr
Date : 1 mars 2010
Since : Choco 2.1.1


Constructor Summary
PSCLEIterator()
           
 
Method Summary
 void dispose()
          This method allows to declare that an object is not used anymore.
 boolean hasNext()
          Returns true if the iteration has more elements.
 void init(C aCause, PartiallyStoredIntVector anEvent, PartiallyStoredVector<C> someElements, PartiallyStoredIntVector someIndices)
           
 Couple<C> next()
          Returns the next element in the iteration.
 void remove()
          Removes from the underlying collection the last element returned by the iterator (optional operation).
 
Methods inherited from class choco.kernel.common.util.disposable.Disposable
init, reusable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PSCLEIterator

public PSCLEIterator()
Method Detail

init

public void init(C aCause,
                 PartiallyStoredIntVector anEvent,
                 PartiallyStoredVector<C> someElements,
                 PartiallyStoredIntVector someIndices)

hasNext

public boolean hasNext()
Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:
true if the iterator has more elements.

next

public Couple<C> next()
Returns the next element in the iteration.

Returns:
the next element in the iteration.
Throws:
NoSuchElementException - iteration has no more elements.

remove

public void remove()
Removes from the underlying collection the last element returned by the iterator (optional operation). This method can be called only once per call to next. The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method.

Specified by:
remove in interface Iterator<Couple<C extends AbstractSConstraint>>
Overrides:
remove in class DisposableIterator<Couple<C extends AbstractSConstraint>>
Throws:
UnsupportedOperationException - if the remove operation is not supported by this Iterator.
IllegalStateException - if the next method has not yet been called, or the remove method has already been called after the last call to the next method.

dispose

public void dispose()
Description copied from class: Disposable
This method allows to declare that an object is not used anymore. It can be reused by another object.

Overrides:
dispose in class Disposable


Copyright © 2012. All Rights Reserved.