mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

neil_a_wilson
27.43.2007 5481111924a6e611d785bb086d42b936293c2795
opendj-sdk/opends/src/server/org/opends/server/backends/jeb/IDSetIterator.java
@@ -54,6 +54,37 @@
  }
  /**
   * Create a new iterator for a given array of entry IDs.
   * @param entryIDList An array of IDs in order or ID.
   * @param begin The entry ID of the first entry that should be returned, or
   *              {@code null} if it should start at the beginning of the list.
   */
  public IDSetIterator(long[] entryIDList, EntryID begin)
  {
    this.entryIDList = entryIDList;
    if (begin == null)
    {
      i = 0;
    }
    else
    {
      for (i=0; i < entryIDList.length; i++)
      {
        if (entryIDList[i] == begin.longValue())
        {
          break;
        }
      }
      if (i >= entryIDList.length)
      {
        i = 0;
      }
    }
  }
  /**
   * Returns <tt>true</tt> if the iteration has more elements. (In other
   * words, returns <tt>true</tt> if <tt>next</tt> would return an element
   * rather than throwing an exception.)