org.opengts.util
Class TabulatedList<KEYTYPE>

java.lang.Object
  extended by org.opengts.util.TabulatedList<KEYTYPE>

public class TabulatedList<KEYTYPE>
extends java.lang.Object


Constructor Summary
TabulatedList()
          Constructor
 
Method Summary
 void count(KEYTYPE key)
          Counts the occurrance of the specified key
 long getCount(KEYTYPE key)
          Returns the count for the specified key
 java.util.Iterator<KEYTYPE> getIterator()
          Returns an Iterator.
 java.util.Iterator<KEYTYPE> getIterator(java.util.Comparator<KEYTYPE> sortBy)
          Returns an Iterator.
 java.util.List<KEYTYPE> getKeyList()
          Return a list of keys
 java.util.List<KEYTYPE> getKeyList(java.util.Comparator<KEYTYPE> sortBy)
          Return a sorted list of keys
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TabulatedList

public TabulatedList()
Constructor

Method Detail

getIterator

public java.util.Iterator<KEYTYPE> getIterator()
Returns an Iterator. Items are in random order


getIterator

public java.util.Iterator<KEYTYPE> getIterator(java.util.Comparator<KEYTYPE> sortBy)
Returns an Iterator. Items are sorted by specified comparator.

Parameters:
sortBy - The Comparator by which the returned iterator is sorted
Returns:
The Iterator

getKeyList

public java.util.List<KEYTYPE> getKeyList()
Return a list of keys

Returns:
A list of keys

getKeyList

public java.util.List<KEYTYPE> getKeyList(java.util.Comparator<KEYTYPE> sortBy)
Return a sorted list of keys

Returns:
A sorted list of keys

count

public void count(KEYTYPE key)
Counts the occurrance of the specified key

Parameters:
key - The key which will be counted

getCount

public long getCount(KEYTYPE key)
Returns the count for the specified key

Parameters:
key - The key for which the count is returned
Returns:
The count