|
|||||||||
| Home >> All >> ru >> gammalabs >> ice >> [ publishing overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
ru.gammalabs.ice.publishing
Class MLString

java.lang.Objectru.gammalabs.ice.publishing.AbstractIF
ru.gammalabs.ice.publishing.MLString
- All Implemented Interfaces:
- java.lang.Cloneable
- public class MLString
- extends AbstractIF
- implements java.lang.Cloneable
- extends AbstractIF
Represents field of information element IE and
its type IEType as multi language string.
| Field Summary | |
protected java.util.Map |
values
Map where keys is Locale locales and
values is String strings. |
| Constructor Summary | |
MLString()
Empty constructor |
|
MLString(java.lang.String str)
Constructs multi language string from string str
using default locale. |
|
MLString(java.lang.String str,
java.util.Locale locale)
Constructs multi language string from string str
using locale. |
|
| Method Summary | |
java.lang.Object |
clone()
Clone this object. |
boolean |
equalsTo(AbstractIF obj)
Compare this object to another MLString object. |
boolean |
equalsTo(AbstractIF obj,
java.util.Locale locale)
Compare this object to another MLString object. |
java.util.Set |
getAvailableLocales()
Returns set of all locales where value of this MLString object was definied. |
java.lang.String |
getValue(java.util.Locale locale)
Returns string representing multi language string in locale locale. |
long |
getValueMaxLength(java.util.Locale locale)
Returns maximum length of string in multi-language string defined in locale locale. |
boolean |
isNullValue(java.util.Locale locale)
Returns true if string in multi-language string in locale locale is null or empty. |
static void |
main(java.lang.String[] args)
Test |
void |
merge(MLString str)
Add values in MLString str to this string,
if there is no locale in this object, add locale and its value from str,
if there is locale in this object, replace value of this locale from str. |
void |
setValue(java.lang.String str,
java.util.Locale locale)
Sets value of multi language string from string str
in locale locale. |
java.lang.String |
toString()
Convert this Object to a human-readable String. |
void |
trim()
Trims all strings in all locales. |
| Methods inherited from class ru.gammalabs.ice.publishing.AbstractIF |
getValue, setValue |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
values
protected java.util.Map values
- Map where keys is
Localelocales and values isStringstrings.
| Constructor Detail |
MLString
public MLString()
- Empty constructor
MLString
public MLString(java.lang.String str)
- Constructs multi language string from string
strusing default locale.
MLString
public MLString(java.lang.String str, java.util.Locale locale)
- Constructs multi language string from string
strusing locale.
| Method Detail |
getValue
public java.lang.String getValue(java.util.Locale locale)
- Returns string representing multi language string in
locale
locale. Returnsnullif value of multi language string was not definied in locallocale.- Specified by:
getValuein classAbstractIF
getAvailableLocales
public java.util.Set getAvailableLocales()
- Returns set of all locales where value of this
MLStringobject was definied. In any case returns empty, not null set.
equalsTo
public boolean equalsTo(AbstractIF obj)
- Compare this object to another
MLStringobject.- Specified by:
equalsToin classAbstractIF
equalsTo
public boolean equalsTo(AbstractIF obj, java.util.Locale locale)
- Compare this object to another
MLStringobject. in localelocale.- Specified by:
equalsToin classAbstractIF
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object - Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string concatenation with this object. If the result is
null, string concatenation will instead use"null".The default implementation returns
getClass().getName() + "@" + Integer.toHexString(hashCode()).
getValueMaxLength
public long getValueMaxLength(java.util.Locale locale)
- Returns maximum length of string in multi-language string
defined in locale
locale.- Specified by:
getValueMaxLengthin classAbstractIF
isNullValue
public boolean isNullValue(java.util.Locale locale)
- Returns
trueif string in multi-language string in localelocaleisnullor empty.- Specified by:
isNullValuein classAbstractIF
merge
public void merge(MLString str)
- Add values in
MLStringstr to this string, if there is no locale in this object, add locale and its value from str, if there is locale in this object, replace value of this locale from str.
trim
public void trim()
- Trims all strings in all locales.
setValue
public void setValue(java.lang.String str, java.util.Locale locale)
- Sets value of multi language string from string
strin localelocale.- Specified by:
setValuein classAbstractIF
clone
public java.lang.Object clone()
- Clone this object.
- Specified by:
clonein classAbstractIF
main
public static void main(java.lang.String[] args)
- Test
|
|||||||||
| Home >> All >> ru >> gammalabs >> ice >> [ publishing overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC