Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc for Elexis version 2.1.7.dev vom 17.03.2013

ag.ion.bion.officelayer.util
Class OrderedHashMap

java.lang.Object
  extended by ag.ion.bion.officelayer.util.OrderedHashMap

public class OrderedHashMap
extends java.lang.Object

A special hash-like structure which saves key value pairs and makes random access to them possible.


Constructor Summary
OrderedHashMap()
           
 
Method Summary
 void clear()
          Clears the content of the structure.
 java.lang.Object get(java.lang.Object key)
          Gets the element dedicated to the specified key.
 java.lang.Object getKeyByValue(java.lang.Object value)
          Gets the key corresponding to the specified value.
 java.lang.Object[] getKeys()
          Gets a list of all keys (currently) used keys in the structure.
 java.lang.Object getNext()
          Gets the next element in the structure.
 java.lang.Object getPredecessor()
          Gets the element directly before the current position and returns ts value.
 java.lang.Object getValueByIndexNumber(int number)
          Gets the element positioned at the specified position in the structure.
 java.lang.Object[] getValues()
          Gets a list of all (currently) set values in the structure.
 java.lang.Object goToHead()
          Gets the first element in the structure.
 java.lang.Object goToTail()
          Gets the last element in the structure.
 void put(java.lang.Object key, java.lang.Object value)
          Adds a new element pair to the structure.
 int size()
          Gets the number of elements (key-value pairs) contained in the structure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrderedHashMap

public OrderedHashMap()
Method Detail

put

public void put(java.lang.Object key,
                java.lang.Object value)
Adds a new element pair to the structure.

Parameters:
key - the key of the new structure element.
value - the value of the new strucutre element.

getKeyByValue

public java.lang.Object getKeyByValue(java.lang.Object value)
Gets the key corresponding to the specified value.

Parameters:
value - the specific value
Returns:
key belonging to the value.

get

public java.lang.Object get(java.lang.Object key)
Gets the element dedicated to the specified key.

Parameters:
key - the specific key.
Returns:
value belonging to the key.

getValueByIndexNumber

public java.lang.Object getValueByIndexNumber(int number)
Gets the element positioned at the specified position in the structure.

Parameters:
number - the specific position of the element.
Returns:
element the wanted element.

clear

public void clear()
Clears the content of the structure.


goToHead

public java.lang.Object goToHead()
Gets the first element in the structure. The internal pointer changes to the first element in the structure.

Returns:
firstElement the first element in the structure.

goToTail

public java.lang.Object goToTail()
Gets the last element in the structure. The internal pointer changes to the last element in the structure.

Returns:
lastElement the last element in the structure.

getNext

public java.lang.Object getNext()
Gets the next element in the structure. Returns null if there is no next element. The current position of the element pointer is moved to the next element.

Returns:
value the next element.

getPredecessor

public java.lang.Object getPredecessor()
Gets the element directly before the current position and returns ts value.

Returns:
value the predecessing element.

getKeys

public java.lang.Object[] getKeys()
Gets a list of all keys (currently) used keys in the structure.

Returns:
listOfKeys a list of keys.

getValues

public java.lang.Object[] getValues()
Gets a list of all (currently) set values in the structure.

Returns:
listOfValues a list of elements.

size

public int size()
Gets the number of elements (key-value pairs) contained in the structure.

Returns:
size the structure size.

Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc for Elexis version 2.1.7.dev vom 17.03.2013