org.pf.util
Class NamedText

java.lang.Object
  extended by org.pf.util.Association
      extended by org.pf.util.NamedValue
          extended by org.pf.util.NamedText
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable, java.util.Map.Entry
Direct Known Subclasses:
DistinguishedNameElement

public class NamedText
extends NamedValue

An association of a name string and a text value. Both, name and value can never be null!
Access to key and value is provided by

Version:
1.2
Author:
Manfred Duchrow
See Also:
Serialized Form

Constructor Summary
NamedText(java.lang.String name, java.lang.String text)
          Initialize the new instance with the given name and value.
 
Method Summary
 NamedText copy()
          Returns a copy of this object
 NamedText copyNamedText()
          Returns a copy of this object
 java.lang.String text()
          Returns the text (value) of the association.
 void text(java.lang.String newText)
          Sets the text (value) of the association.
 void value(java.lang.Object newValue)
          Sets the value of the association.
 void value(java.lang.String newValue)
          Sets the value (text) of the association.
 
Methods inherited from class org.pf.util.NamedValue
compareTo, copyNamedValue, key, key, name, name
 
Methods inherited from class org.pf.util.Association
copyAssociation, equals, getKey, getValue, hashCode, key, setValue, toString, value
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NamedText

public NamedText(java.lang.String name,
                 java.lang.String text)
Initialize the new instance with the given name and value. Both, name and value must not be null. If any of them is null it will be automatically translated to an empty String ("").

Method Detail

value

public void value(java.lang.Object newValue)
Sets the value of the association. Only strings are allowed.

Overrides:
value in class Association

value

public void value(java.lang.String newValue)
Sets the value (text) of the association.

Parameters:
newValue - The new value (must not be null !)

text

public void text(java.lang.String newText)
Sets the text (value) of the association.

Parameters:
newText - The new text (must not be null !)

text

public java.lang.String text()
Returns the text (value) of the association.


copy

public NamedText copy()
Returns a copy of this object


copyNamedText

public NamedText copyNamedText()
Returns a copy of this object