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

java.lang.Object
  extended bycom.hp.hpl.jena.util.iterator.NiceIterator
      extended bycom.hp.hpl.jena.util.iterator.WrappedIterator
          extended bycom.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()
          remove: defer to the base iterator
 
Methods inherited from class com.hp.hpl.jena.util.iterator.WrappedIterator
close, close, create
 
Methods inherited from class com.hp.hpl.jena.util.iterator.NiceIterator
andThen, andThen, filterDrop, filterKeep, mapWith, removeNext
 
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
remove: defer to the base iterator

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


Copyright © 2000-2003 Hewlett-Packard. All Rights Reserved.