org.apache.ws.scout.registry.infomodel
Class LocalizedStringImpl

java.lang.Object
  extended by org.apache.ws.scout.registry.infomodel.LocalizedStringImpl
All Implemented Interfaces:
javax.xml.registry.infomodel.LocalizedString

public class LocalizedStringImpl
extends java.lang.Object
implements javax.xml.registry.infomodel.LocalizedString

Implements JAXR Interface. For futher details, look into the JAXR API Javadoc.

Author:
Anil Saldhana

Field Summary
 
Fields inherited from interface javax.xml.registry.infomodel.LocalizedString
DEFAULT_CHARSET_NAME
 
Constructor Summary
LocalizedStringImpl()
           
LocalizedStringImpl(java.util.Locale locale, java.lang.String value, java.lang.String charsetName)
          Constuctor for a LocalizedString.
 
Method Summary
 boolean equals(java.lang.Object o)
          There is a spec ambiguity here as it does not define how equals is determined for LocalizedString but they are intended to be used in Collections.
 java.lang.String getCharsetName()
           
 java.util.Locale getLocale()
           
 java.lang.String getValue()
           
 int hashCode()
           
 void setCharsetName(java.lang.String charsetName)
           
 void setLocale(java.util.Locale locale)
           
 void setValue(java.lang.String value)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalizedStringImpl

public LocalizedStringImpl()

LocalizedStringImpl

public LocalizedStringImpl(java.util.Locale locale,
                           java.lang.String value,
                           java.lang.String charsetName)
Constuctor for a LocalizedString.

Parameters:
locale - the locale; must not be null
value - the value; may be null
charsetName - the charset; must not be null
Method Detail

getCharsetName

public java.lang.String getCharsetName()
Specified by:
getCharsetName in interface javax.xml.registry.infomodel.LocalizedString

getLocale

public java.util.Locale getLocale()
Specified by:
getLocale in interface javax.xml.registry.infomodel.LocalizedString

getValue

public java.lang.String getValue()
Specified by:
getValue in interface javax.xml.registry.infomodel.LocalizedString

setCharsetName

public void setCharsetName(java.lang.String charsetName)
Specified by:
setCharsetName in interface javax.xml.registry.infomodel.LocalizedString

setLocale

public void setLocale(java.util.Locale locale)
Specified by:
setLocale in interface javax.xml.registry.infomodel.LocalizedString

setValue

public void setValue(java.lang.String value)
Specified by:
setValue in interface javax.xml.registry.infomodel.LocalizedString

equals

public boolean equals(java.lang.Object o)
There is a spec ambiguity here as it does not define how equals is determined for LocalizedString but they are intended to be used in Collections. We define it as locale, charsetName and value being equal.

Overrides:
equals in class java.lang.Object
Parameters:
o - the other object
Returns:
true if they are equal

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

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


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.