com.rubecula.util
Class SortedIterator

java.lang.Object
  extended bycom.rubecula.util.SortedIterator
All Implemented Interfaces:
java.util.Iterator

public class SortedIterator
extends java.lang.Object
implements java.util.Iterator

Class

Since:
V_0_0
Version:
$Revision: 1.3 $
Author:
Robin Hillyard

Field Summary
private  java.util.Iterator _Iterator
           
private  java.util.TreeSet _Sorted
           
 
Constructor Summary
SortedIterator(java.util.Collection unsorted)
           
 
Method Summary
 java.util.Enumeration getEnumeration()
           
 boolean hasNext()
           
 java.lang.Object next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_Sorted

private final java.util.TreeSet _Sorted

_Iterator

private final java.util.Iterator _Iterator
Constructor Detail

SortedIterator

public SortedIterator(java.util.Collection unsorted)
Parameters:
unsorted - the Collection to be sorted
See Also:
_Sorted, {@link #_Iterator} is set to the value of {@link #_Sorted}.{@link TreeSet#iterator()}
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator
Returns:
true if there is another element

next

public java.lang.Object next()
Specified by:
next in interface java.util.Iterator
Returns:
the next element from the iterator

remove

public void remove()
Specified by:
remove in interface java.util.Iterator

getEnumeration

public java.util.Enumeration getEnumeration()