|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.text.Format
com.davisor.data.Type
com.davisor.data.LocaleType
LocaleType implements an abstract base class for locale-dependent
types. All the changes that this class makes to the locale member
variable go through the setLocale method.
In cases where locale is unspecified, all LocaleType sub-classes
should always use DEFAULT_LOCALE (US locale) instead
of system default locale. This brings important consistency over
different runtime environments, where system own default locales are
different.
DateType,
TimestampType,
Serialized Form| Nested Class Summary |
| Nested classes inherited from class java.text.Format |
java.text.Format.Field |
| Field Summary | |
static java.util.Locale |
DEFAULT_LOCALE
Default locale (US). |
protected java.util.Locale |
M_locale
Locale. |
| Fields inherited from class com.davisor.data.Type |
METADATA_GROUP, METADATA_NAME, METADATA_PARENT, METADATA_SUBCHANNELS, TYPENAME |
| Constructor Summary | |
protected |
LocaleType(LocaleType lt)
Deep copy constructor. |
protected |
LocaleType(java.lang.String typeName,
java.lang.String dataName,
java.lang.String id,
java.util.Map metaData,
java.util.Locale locale)
Creates a new locale type. |
| Method Summary | |
boolean |
equals(java.lang.Object o)
Tests if this object is equal with another object. |
java.lang.String |
getFormat()
Gets a localization specification string. |
java.util.Locale |
getLocale()
Gets the current locale. |
int |
hashCode()
Returns a hash code value for the object. |
void |
setFormat(java.lang.String format)
Sets the type specification. |
void |
setLocale(java.util.Locale locale)
Sets the current locale. |
void |
setLocale(java.lang.String localeString)
Sets the current locale by a locale string. |
| Methods inherited from class com.davisor.data.Type |
ceil, check, check, compare, create, create, create, create, create, dup, dup, floor, format, getCompatibility, getDataName, getId, getID, getMetaData, getMetaData, getSpecs, getSQLCode, getSQLName, getSQLName, getTypeName, getValueClass, isNull, parseObject, register, register, setDataName, setId, setID, setMetaData, setMetaData, setSpecs, toData, toData, toData, toData, toString, toXML, xmlEnd, xmlStart, zero |
| Methods inherited from class java.text.Format |
clone, format, formatToCharacterIterator, parseObject |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.util.Locale DEFAULT_LOCALE
protected java.util.Locale M_locale
| Constructor Detail |
protected LocaleType(LocaleType lt)
protected LocaleType(java.lang.String typeName,
java.lang.String dataName,
java.lang.String id,
java.util.Map metaData,
java.util.Locale locale)
typeName - type namedataName - data nameid - type identitymetaData - type meta data map (may be null)locale - type locale (may be null)| Method Detail |
public boolean equals(java.lang.Object o)
Locale types are equal if their super-classes and locales are.
equals in interface java.util.Comparatorequals in class TypeCompare.equals(Object,Object)public int hashCode()
hashCode in class Typepublic java.lang.String getFormat()
Locale object representation string,
or a null string.
getFormat in class Typenull specification stringgetLocale()public void setFormat(java.lang.String format)
setFormat in class Typeformat - type specification string (may be null)getFormat(),
setLocale(String)public java.util.Locale getLocale()
setLocale(String),
getFormat()public void setLocale(java.util.Locale locale)
locale - new locale (may be null)getLocale(),
setLocale(String),
setFormat(java.lang.String)public void setLocale(java.lang.String localeString)
The locale is extracted from the given locale string, as
described by the LocaleParser class. If the locale
string cannot be interpreted as a locale, then the type locale is
set to null.
localeString - locale string (may be null)getLocale(),
setLocale(String),
setFormat(java.lang.String),
LocaleParser
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||