BRUtil - Making Java a Kinder, Gentler, Place to be.

brutil
Interface SortedMap

All Superinterfaces:
Collection, Map
All Known Implementing Classes:
BSTree

public interface SortedMap
extends Map


Method Summary
 java.util.Iterator iterator()
          Returns an Iterator for this tree.
 java.lang.Object maxKey()
          Returns the maximum key in the Map.
 java.lang.Object minKey()
          Returns the minimum key in the Map.
 java.lang.Object nextKey(java.lang.Object key)
          Returns the lowest key that is greater that the specified key.
 java.lang.Object prevKey(java.lang.Object key)
          Returns the greatest key that is less that the specified key.
 
Methods inherited from interface brutil.Map
containsKey, get, put, remove
 
Methods inherited from interface brutil.Collection
clear, isEmpty, size
 

Method Detail

minKey

public java.lang.Object minKey()
Returns the minimum key in the Map.
Returns:
the minimum key

maxKey

public java.lang.Object maxKey()
Returns the maximum key in the Map.
Returns:
the maximum key

prevKey

public java.lang.Object prevKey(java.lang.Object key)
Returns the greatest key that is less that the specified key.
Parameters:
key - Comparable object for which to find the previous key.
Returns:
the greatest key that is less that the specified key.
Throws:
ClassCastException - key is not Comparable

nextKey

public java.lang.Object nextKey(java.lang.Object key)
Returns the lowest key that is greater that the specified key.
Parameters:
key - Comparable object for which to find the next key.
Returns:
the lowest key that is greater that the specified key.
Throws:
ClassCastException - key is not Comparable

iterator

public java.util.Iterator iterator()
Returns an Iterator for this tree.
Returns:
an Iterator over this tree


BRUtil - Making Java a Kinder, Gentler, Place to be.