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.Object at()
      Gets the current element in the collection.
      boolean more()
      Returns true if there are more elements in the collection.
      java.lang.Object next()
      Advances the iterator to the next element and gets that element in the collection.
      java.lang.Object previous()
      Gets the current element in the collection and repositions the iterator to the previous element.
      void reset()
      Resets the iterator to the beginning of the collection.
      boolean setToFirst()
      Sets to the first element in the collection.
      boolean setToLast()
      Sets to the last element in the collection.
      boolean setToNext()
      Sets to the next element in the collection.
      boolean setToPrevious()
      Sets to the previous element in the collection.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DKSegmentedPartsIterator

        public DKSegmentedPartsIterator(java.lang.Object[] collImp,
                                        int size)
        Constructs a new DKSegmentedPartsIterator.
        Parameters:
        collImp - the array of objects to iterate over
        size - the number of valid elements in the array
    • Method Detail

      • at

        public java.lang.Object at()
                            throws DKUsageError
        Gets the current element in the collection.
        Specified by:
        at in interface DKSequentialIterator
        Returns:
        current element.
        Throws:
        DKUsageError - if the current position is invalid
      • next

        public java.lang.Object next()
                              throws DKUsageError
        Advances the iterator to the next element and gets that element in the collection.
        Specified by:
        next in interface dkIterator
        Returns:
        current element.
        Throws:
        DKUsageError - if there are no more elements
      • previous

        public java.lang.Object previous()
                                  throws DKUsageError
        Gets the current element in the collection and repositions the iterator to the previous element.
        Specified by:
        previous in interface DKSequentialIterator
        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:
        reset in interface dkIterator
      • more

        public boolean more()
        Returns true if there are more elements in the collection.
        Specified by:
        more in interface dkIterator
        Returns:
        true or false.
      • setToFirst

        public boolean setToFirst()
        Sets to the first element in the collection.
        Specified by:
        setToFirst in interface DKSequentialIterator
        Returns:
        true if position is valid.
      • setToLast

        public boolean setToLast()
        Sets to the last element in the collection.
        Specified by:
        setToLast in interface DKSequentialIterator
        Returns:
        true if position is valid.
      • setToNext

        public boolean setToNext()
        Sets to the next element in the collection.
        Specified by:
        setToNext in interface DKSequentialIterator
        Returns:
        true if position is valid.
      • setToPrevious

        public boolean setToPrevious()
        Sets to the previous element in the collection.
        Specified by:
        setToPrevious in interface DKSequentialIterator
        Returns:
        true if position is valid.
Copyright © 2024 IBM Corporation

Copyright © 2024 IBM Corporation. All rights reserved.