com.ibm.mm.sdk.common
Class DKSegmentedPartsIterator
- java.lang.Object
-
- com.ibm.mm.sdk.common.DKSegmentedPartsIterator
-
- All Implemented Interfaces:
- dkIterator, DKSequentialIterator, java.io.Serializable
public class DKSegmentedPartsIterator extends java.lang.Object implements DKSequentialIterator, java.io.Serializable
Implementation of DKSequentialIterator for iterating over segmented parts collections. This iterator supports bi-directional traversal of collection elements.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description DKSegmentedPartsIterator(java.lang.Object[] collImp, int size)Constructs a new DKSegmentedPartsIterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Objectat()Gets the current element in the collection.booleanmore()Returns true if there are more elements in the collection.java.lang.Objectnext()Advances the iterator to the next element and gets that element in the collection.java.lang.Objectprevious()Gets the current element in the collection and repositions the iterator to the previous element.voidreset()Resets the iterator to the beginning of the collection.booleansetToFirst()Sets to the first element in the collection.booleansetToLast()Sets to the last element in the collection.booleansetToNext()Sets to the next element in the collection.booleansetToPrevious()Sets to the previous element in the collection.
-
-
-
Constructor Detail
-
DKSegmentedPartsIterator
public DKSegmentedPartsIterator(java.lang.Object[] collImp, int size)Constructs a new DKSegmentedPartsIterator.- Parameters:
collImp- the array of objects to iterate oversize- the number of valid elements in the array
-
-
Method Detail
-
at
public java.lang.Object at() throws DKUsageErrorGets the current element in the collection.- Specified by:
atin interfaceDKSequentialIterator- Returns:
- current element.
- Throws:
DKUsageError- if the current position is invalid
-
next
public java.lang.Object next() throws DKUsageErrorAdvances the iterator to the next element and gets that element in the collection.- Specified by:
nextin interfacedkIterator- Returns:
- current element.
- Throws:
DKUsageError- if there are no more elements
-
previous
public java.lang.Object previous() throws DKUsageErrorGets the current element in the collection and repositions the iterator to the previous element.- Specified by:
previousin interfaceDKSequentialIterator- Returns:
- current element.
- Throws:
DKUsageError- if the current position is invalid
-
reset
public void reset()
Resets the iterator to the beginning of the collection.- Specified by:
resetin interfacedkIterator
-
more
public boolean more()
Returns true if there are more elements in the collection.- Specified by:
morein interfacedkIterator- Returns:
- true or false.
-
setToFirst
public boolean setToFirst()
Sets to the first element in the collection.- Specified by:
setToFirstin interfaceDKSequentialIterator- Returns:
- true if position is valid.
-
setToLast
public boolean setToLast()
Sets to the last element in the collection.- Specified by:
setToLastin interfaceDKSequentialIterator- Returns:
- true if position is valid.
-
setToNext
public boolean setToNext()
Sets to the next element in the collection.- Specified by:
setToNextin interfaceDKSequentialIterator- Returns:
- true if position is valid.
-
setToPrevious
public boolean setToPrevious()
Sets to the previous element in the collection.- Specified by:
setToPreviousin interfaceDKSequentialIterator- Returns:
- true if position is valid.
-
-