net.ultrametrics.rcs
Class Element

java.lang.Object
  |
  +--net.ultrametrics.rcs.Element

public class Element
extends java.lang.Object

Encapsulation of an element of an RCS controlled entity.

An element is simply an name-value key pair

i.e. (version, 2.1.1)
(symbols, (alpha_release, beta_release))

plus some intelligence about how to parse the information from a buffer containing raw RCS control strings. (i.e. version: 2.1.1).


Constructor Summary
Element()
          Create a new uninitialized element.
Element(java.lang.String string)
          Create a new element from the provided string.
Element(java.lang.String key, java.lang.String value)
          Create a new element from the provided key-value pair.
 
Method Summary
 java.lang.Object getKey()
          Retrieve the key associated with this element.
 java.lang.Object getValue()
          Retrieve the value of this element.
 java.util.Collection getValues()
          Retrieve the values of this element.
 void setKey(java.lang.Object key)
          Set the key associated with this element.
 void setValue(java.lang.Object value)
          Set the value of this element.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Element

public Element()
Create a new uninitialized element.

Element

public Element(java.lang.String key,
               java.lang.String value)
Create a new element from the provided key-value pair.
Parameters:
key - the key.
value - the value.

Element

public Element(java.lang.String string)
Create a new element from the provided string.
Parameters:
string - a delimited string containing an unextracted element.
Method Detail

getKey

public java.lang.Object getKey()
Retrieve the key associated with this element.
Returns:
the key.

setKey

public void setKey(java.lang.Object key)
Set the key associated with this element.

getValue

public java.lang.Object getValue()
Retrieve the value of this element.
Returns:
the value.

getValues

public java.util.Collection getValues()
Retrieve the values of this element.
Returns:
a collection of the values.

setValue

public void setValue(java.lang.Object value)
Set the value of this element.
Parameters:
value - the value.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object