Oracle® Coherence Java API Reference
v3.5.3

E15583-01

com.tangosol.util
Class SortedEnumerator

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.util.SimpleEnumerator
          extended by com.tangosol.util.SortedEnumerator
All Implemented Interfaces:
java.util.Enumeration, java.util.Iterator

public class SortedEnumerator
extends SimpleEnumerator

Sorts the contents of the passed enumerator then enumerates those contents.

Version:
1.00, 02/15/99
Author:
Cameron Purdy

Field Summary
 
Fields inherited from class com.tangosol.util.SimpleEnumerator
m_aoItem, m_fForward, m_iItem, m_ofLimit
 
Constructor Summary
SortedEnumerator(java.util.Enumeration enmr)
          Construct a Sorted enumerator.
SortedEnumerator(java.util.Iterator iterator)
          Construct a Sorted enumerator.
 
Method Summary
static java.lang.Object[] toArray(java.util.Enumeration enmr)
          Return the contents of the passed Enumeration as a sorted array.
static java.lang.Object[] toArray(java.util.Iterator iterator)
          Return the contents of the passed Iterator as a sorted array.
 
Methods inherited from class com.tangosol.util.SimpleEnumerator
hasMoreElements, hasNext, next, nextElement, remove, toArray, toArray, toArray, toArray
 

Constructor Detail

SortedEnumerator

public SortedEnumerator(java.util.Enumeration enmr)
Construct a Sorted enumerator.

Parameters:
enmr - the Enumeration that needs to be sorted

SortedEnumerator

public SortedEnumerator(java.util.Iterator iterator)
Construct a Sorted enumerator.

Parameters:
iterator - the Iterator that needs to be sorted
Method Detail

toArray

public static java.lang.Object[] toArray(java.util.Enumeration enmr)
Return the contents of the passed Enumeration as a sorted array.

Parameters:
enmr - an Enumeration of potentially unsorted objects
Returns:
an array of sorted objects

toArray

public static java.lang.Object[] toArray(java.util.Iterator iterator)
Return the contents of the passed Iterator as a sorted array.

Parameters:
iterator - an Iterator of potentially unsorted objects
Returns:
an array of sorted objects

Oracle® Coherence Java API Reference
v3.5.3

E15583-01

Copyright © 2000, 2010, Oracle. All rights reserved.