Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.hp.hpl.jena.util.iterator
Class RandomOrderIterator

    java.lang.Object
      com.hp.hpl.jena.util.iterator.NiceIterator
          com.hp.hpl.jena.util.iterator.WrappedIterator
              com.hp.hpl.jena.util.iterator.RandomOrderIterator

All Implemented Interfaces:
  ClosableIterator, ExtendedIterator, java.util.Iterator

    public class RandomOrderIterator

extends WrappedIterator

RandomOrderIterator - Reorders the elements returned by an Iterator.

Author:
  jjc

Constructor Summary
`RandomOrderIterator(int sz, java.util.Iterator base)` Wrap the base iterator, randomizing with a buffer of length sz.

Method Summary
`boolean` | `hasNext()` hasNext: defer to the base iterator
`java.lang.Object` | `next()` next: defer to the base iterator
`void` | `remove()` if .remove() is allowed, delegate to the base iterator's .remove; otherwise, throw an UnsupportedOperationException.

Methods inherited from class com.hp.hpl.jena.util.iterator.WrappedIterator
`close, close, create, createNoRemove, forTestingOnly_getBase`

Methods inherited from class com.hp.hpl.jena.util.iterator.NiceIterator
`andThen, andThen, asList, asSet, emptyIterator, filterDrop, filterKeep, mapWith, removeNext, toList, toSet`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RandomOrderIterator

    public RandomOrderIterator(int sz,
                               java.util.Iterator base)

  Wrap the base iterator, randomizing with a buffer of length sz.

Method Detail

### hasNext

    public boolean hasNext()

  Description copied from class: `WrappedIterator`
  hasNext: defer to the base iterator

  Specified by:
    `hasNext` in interface `java.util.Iterator`
  Overrides:
    `hasNext` in class `WrappedIterator`

### next

    public java.lang.Object next()

  Description copied from class: `WrappedIterator`
  next: defer to the base iterator

  Specified by:
    `next` in interface `java.util.Iterator`
  Overrides:
    `next` in class `WrappedIterator`

### remove

    public void remove()

  Description copied from class: `WrappedIterator`
  if .remove() is allowed, delegate to the base iterator's .remove; otherwise, throw an UnsupportedOperationException.

  Specified by:
    `remove` in interface `java.util.Iterator`
  Overrides:
    `remove` in class `WrappedIterator`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP