org.jdtaus.core.container
Class Text

java.lang.Object
  extended by org.jdtaus.core.container.Text
All Implemented Interfaces:
Serializable, Cloneable

public class Text
extends Object
implements Cloneable, Serializable

Localized text.

Version:
$Id: Text.java 8044 2009-07-02 01:29:05Z schulte2005 $
Author:
Christian Schulte
See Also:
Serialized Form

Constructor Summary
Text()
           
 
Method Summary
 Object clone()
          Creates and returns a copy of this object.
 Locale[] getLocales()
          Gets all locales for which the instance holds values.
 String getValue()
          Gets the value of the text for the default language.
 String getValue(Locale locale)
          Gets the value of the text for a given locale.
 void setValue(Locale locale, String value)
          Setter for property value for a given locale.
 void setValue(String value)
          Setter for property value.
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Text

public Text()
Method Detail

clone

public Object clone()
Creates and returns a copy of this object. This method performs a "shallow copy" of this object, not a "deep copy" operation.

Overrides:
clone in class Object
Returns:
a clone of this instance.

getLocales

public Locale[] getLocales()
Gets all locales for which the instance holds values.

Returns:
all locales for which the instance holds values.

getValue

public String getValue()
Gets the value of the text for the default language.

Returns:
the value of the text for the default language or null.

getValue

public String getValue(Locale locale)
Gets the value of the text for a given locale.

Parameters:
locale - the locale of the value to return.
Returns:
the value of the text for locale or null.
Throws:
NullPointerException - if locale is null.

setValue

public void setValue(Locale locale,
                     String value)
Setter for property value for a given locale.

Parameters:
locale - the locale to store value with.
value - the new value of the text for locale.
Throws:
NullPointerException - if locale is null.

setValue

public void setValue(String value)
Setter for property value.

Parameters:
value - the new value of the text for the default language.

toString

public String toString()
Returns a string representation of the object.

Overrides:
toString in class Object
Returns:
a string representation of the object.


Copyright © 2005-2009 jDTAUS. All Rights Reserved.