Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.util
Class OrderedProperties

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<Object,Object>
          extended by java.util.Properties
              extended by net.java.sip.communicator.util.OrderedProperties
All Implemented Interfaces:
Serializable, Cloneable, Map<Object,Object>

public class OrderedProperties
extends Properties

Implementation of Properties that keep order of couples [key, value] added.

Author:
Sebastien Vincent
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Properties
defaults
 
Constructor Summary
OrderedProperties()
           
 
Method Summary
 void clear()
          Clear the entries.
 Enumeration<Object> elements()
          Get the elements of the LinkedHashMap.
 Set<Map.Entry<Object,Object>> entrySet()
          Return the entry Set.
 Object get(Object key)
          Get the object pointed by key.
 Enumeration<Object> keys()
          Get the keys enumeration.
 Object put(Object key, Object value)
          Put an couple key, value
 Object remove(Object key)
          Remove a key entry
 int size()
          Get number of elements.
 
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames
 
Methods inherited from class java.util.Hashtable
clone, contains, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, rehash, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OrderedProperties

public OrderedProperties()
Method Detail

get

public Object get(Object key)
Get the object pointed by key.

Specified by:
get in interface Map<Object,Object>
Overrides:
get in class Hashtable<Object,Object>
Parameters:
key - key
Returns:
value pointed by key or null if not set

put

public Object put(Object key,
                  Object value)
Put an couple key, value

Specified by:
put in interface Map<Object,Object>
Overrides:
put in class Hashtable<Object,Object>
Parameters:
key - key
value - value
Returns:
previous value pointed by key if any, null otherwise

remove

public Object remove(Object key)
Remove a key entry

Specified by:
remove in interface Map<Object,Object>
Overrides:
remove in class Hashtable<Object,Object>
Parameters:
key - key
Returns:
previous value pointed by key if any, null otherwise

clear

public void clear()
Clear the entries.

Specified by:
clear in interface Map<Object,Object>
Overrides:
clear in class Hashtable<Object,Object>

keys

public Enumeration<Object> keys()
Get the keys enumeration.

Overrides:
keys in class Hashtable<Object,Object>
Returns:
keys enumeration

elements

public Enumeration<Object> elements()
Get the elements of the LinkedHashMap.

Overrides:
elements in class Hashtable<Object,Object>
Returns:
enumeration

entrySet

public Set<Map.Entry<Object,Object>> entrySet()
Return the entry Set.

Specified by:
entrySet in interface Map<Object,Object>
Overrides:
entrySet in class Hashtable<Object,Object>
Returns:
entry Set

size

public int size()
Get number of elements.

Specified by:
size in interface Map<Object,Object>
Overrides:
size in class Hashtable<Object,Object>
Returns:
number of elements

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.