uk.ac.sanger.psu.gfmerge.util.algotools
Class MyTreeMap

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.TreeMap
          extended by uk.ac.sanger.psu.gfmerge.util.algotools.MyTreeMap
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map, java.util.SortedMap

public class MyTreeMap
extends java.util.TreeMap
implements java.util.SortedMap

class MyTreeMap adds some more functionality to TreeMap

Version:
1.0
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Field Summary
private  long maxObjectFound
          stores maximum length [long] seen during processing.
 
Constructor Summary
MyTreeMap()
          constructor of MyTreeMap objects
 
Method Summary
 long getMaxObjectFound()
          accessor method which returns max length seen.
 java.lang.Object nextKey(java.lang.Object key)
          method which returns the successor of a key.
 java.lang.Object previousKey(java.lang.Object key)
          method which returns the predecessor of a key.
 void setMaxObjectFound(long _maxObjectFound)
          accessor method which sets max length seen.
 
Methods inherited from class java.util.TreeMap
clear, clone, comparator, containsKey, containsValue, entrySet, firstKey, get, headMap, keySet, lastKey, put, putAll, remove, size, subMap, tailMap, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, isEmpty, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.SortedMap
comparator, firstKey, headMap, lastKey, subMap, tailMap
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Field Detail

maxObjectFound

private long maxObjectFound
stores maximum length [long] seen during processing. Public set method!

Constructor Detail

MyTreeMap

public MyTreeMap()
constructor of MyTreeMap objects

Method Detail

getMaxObjectFound

public long getMaxObjectFound()
accessor method which returns max length seen.

Returns:
max length seen

setMaxObjectFound

public void setMaxObjectFound(long _maxObjectFound)
accessor method which sets max length seen. Public set-method!

Parameters:
_maxObjectFound - max length seen

nextKey

public java.lang.Object nextKey(java.lang.Object key)
method which returns the successor of a key. Returns null if last key is passed as argument.

Parameters:
key - key for which successor is sought
Returns:
successor of a key

previousKey

public java.lang.Object previousKey(java.lang.Object key)
method which returns the predecessor of a key. Returns null if first key is passed as argument.

Parameters:
key - key for which predecessor is sought
Returns:
predecessor of a key