Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

ru.gammalabs.ice.publishing
Class LocaleSet  view LocaleSet download LocaleSet.java

java.lang.Object
  extended byru.gammalabs.ice.publishing.AbstractIF
      extended byru.gammalabs.ice.publishing.LocaleSet
All Implemented Interfaces:
java.lang.Cloneable

public class LocaleSet
extends AbstractIF
implements java.lang.Cloneable

Represents field of information element IE and its type IEType as list of locales Locale.


Field Summary
private  java.util.Set locales
          Set of locales Locale
private static org.apache.log4j.Category log
          For debuging errors
 
Constructor Summary
LocaleSet()
          Empty constructor constructs empty HashSet for locales.
LocaleSet(java.util.Collection lcls)
          Constructs set of locales using collection of locales tmpls of class Locale.
 
Method Summary
 void addLocale(java.util.Locale lcl)
          Adds locale to set of locales.
 java.lang.Object clone()
          Clone this object.
 boolean equalsTo(AbstractIF obj)
          Compare this object to another LocaleSet object.
 boolean equalsTo(AbstractIF obj, java.util.Locale locale)
          Compare this object to another LocaleSet object.
 java.util.Set getLocaleSet()
          Returns collection of all available in this field locales.
 java.lang.String getValue(java.util.Locale locale)
          Returns string in locale locale representing this information field.
 long getValueMaxLength(java.util.Locale locale)
          Returns maximum length of locale set field.
 boolean isNullValue(java.util.Locale locale)
          Returns true if locale set is null or empty.
 void setLocales(java.util.Collection lcls)
          Sets locales using collection of locales lcls of class Locale.
 void setValue(java.lang.String str, java.util.Locale locale)
          Makes information field from string str in locale locale.
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
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

log

private static final org.apache.log4j.Category log
For debuging errors


locales

private java.util.Set locales
Set of locales Locale

Constructor Detail

LocaleSet

public LocaleSet()
Empty constructor constructs empty HashSet for locales.


LocaleSet

public LocaleSet(java.util.Collection lcls)
Constructs set of locales using collection of locales tmpls of class Locale.

Method Detail

getLocaleSet

public java.util.Set getLocaleSet()
Returns collection of all available in this field locales. Collection is collection of Locale objects.


getValue

public java.lang.String getValue(java.util.Locale locale)
Description copied from class: AbstractIF
Returns string in locale locale representing this information field. In some cases, when field is null or not defined, can returns null.

Specified by:
getValue in class AbstractIF

equalsTo

public boolean equalsTo(AbstractIF obj)
Compare this object to another LocaleSet object.

Specified by:
equalsTo in class AbstractIF

equalsTo

public boolean equalsTo(AbstractIF obj,
                        java.util.Locale locale)
Compare this object to another LocaleSet object. in locale locale.

Specified by:
equalsTo in class AbstractIF

getValueMaxLength

public long getValueMaxLength(java.util.Locale locale)
Returns maximum length of locale set field. Always returns 0.

Specified by:
getValueMaxLength in class AbstractIF

isNullValue

public boolean isNullValue(java.util.Locale locale)
Returns true if locale set is null or empty.

Specified by:
isNullValue in class AbstractIF

setLocales

public void setLocales(java.util.Collection lcls)
Sets locales using collection of locales lcls of class Locale.


addLocale

public void addLocale(java.util.Locale lcl)
Adds locale to set of locales.


setValue

public void setValue(java.lang.String str,
                     java.util.Locale locale)
              throws ru.gammalabs.ice.publishing.framework.CMSException
Description copied from class: AbstractIF
Makes information field from string str in locale locale.

Specified by:
setValue in class AbstractIF

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()).


clone

public java.lang.Object clone()
Clone this object.

Specified by:
clone in class AbstractIF