com.isti.util
Class IstiLocale

java.lang.Object
  extended by com.isti.util.IstiLocale
All Implemented Interfaces:
Archivable

public class IstiLocale
extends java.lang.Object
implements Archivable

Class IstiLocale extends a Locale to add additional functionality.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.isti.util.Archivable
Archivable.Marker
 
Field Summary
static java.lang.String DEFAULT_DISPLAY_NAME
          The display name for the system default locale.
 
Constructor Summary
IstiLocale(IstiLocale istiLocaleObj)
          Allocates a new IstiLocale object.
IstiLocale(java.util.Locale localeObj)
          Allocates a new IstiLocale object.
IstiLocale(java.lang.String displayName)
          Allocates a new IstiLocale object.
IstiLocale(java.lang.String dataStr, Archivable.Marker mkrObj)
          Allocates a new IstiLocale object.
 
Method Summary
 java.lang.Object clone()
          Creates and returns a copy of this object.
 boolean equals(IstiLocale obj)
          Indicates whether some other object is "equal to" this one.
 boolean equals(java.util.Locale obj)
          Indicates whether some other object is "equal to" this one.
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this one.
 java.util.Date getArchiveDate()
          Returns a 'Date' object representing the date to be used for archival purposes.
static java.util.Locale[] getAvailableNumberLocales()
          The set of Locales for which number formats are installed.
static CfgPropValidator getCfgPropValidator()
          Gets the configuration property validator.
 java.lang.String getDisplayName()
          Gets the display name.
static java.lang.String getDisplayName(java.util.Locale localeObj)
          Gets the display name for the specified locale.
static java.lang.String getDisplayName(java.util.Locale localeObj, java.lang.String defaultDisplayName)
          Gets the display name for the specified locale.
 java.util.Locale getLocale()
          Gets the 'Locale' object.
static java.util.Locale getLocaleFromDataString(java.lang.String dataStr)
          Gets the locale for the specified data string.
static java.util.Locale getLocaleFromDisplayName(java.lang.String displayName)
          Gets the locale for the specified display name.
 int hashCode()
          Returns a hash code value for the object.
 void setArchiveDate(java.util.Date dateObj)
          Sets the 'Date' object representing the date to be used for archival purposes.
 java.lang.String toArchivedForm()
          Returns the archivable representation for this object.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_DISPLAY_NAME

public static java.lang.String DEFAULT_DISPLAY_NAME
The display name for the system default locale.

Constructor Detail

IstiLocale

public IstiLocale(IstiLocale istiLocaleObj)
Allocates a new IstiLocale object.

Parameters:
istiLocaleObj - IstiLocale object.

IstiLocale

public IstiLocale(java.util.Locale localeObj)
Allocates a new IstiLocale object.

Parameters:
localeObj - Locale object.

IstiLocale

public IstiLocale(java.lang.String dataStr,
                  Archivable.Marker mkrObj)
Allocates a new IstiLocale object.

Parameters:
dataStr - the data string.
mkrObj - the marker object.

IstiLocale

public IstiLocale(java.lang.String displayName)
Allocates a new IstiLocale object.

Parameters:
displayName - the locale display name.
Method Detail

clone

public java.lang.Object clone()
Creates and returns a copy of this object.

Overrides:
clone in class java.lang.Object
Returns:
a copy of this object.

equals

public boolean equals(IstiLocale obj)
Indicates whether some other object is "equal to" this one.

Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

equals

public boolean equals(java.util.Locale obj)
Indicates whether some other object is "equal to" this one.

Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

getArchiveDate

public java.util.Date getArchiveDate()
Returns a 'Date' object representing the date to be used for archival purposes.

Specified by:
getArchiveDate in interface Archivable
Returns:
A 'Date' object representing the date that the item should be archived under.

getAvailableNumberLocales

public static java.util.Locale[] getAvailableNumberLocales()
The set of Locales for which number formats are installed.

Returns:
the set of Locales for which number formats are installed.

getDisplayName

public java.lang.String getDisplayName()
Gets the display name.

Returns:
the display name.

getDisplayName

public static java.lang.String getDisplayName(java.util.Locale localeObj)
Gets the display name for the specified locale.

Parameters:
localeObj - the locale object.
Returns:
the the display name or null if not available.

getDisplayName

public static java.lang.String getDisplayName(java.util.Locale localeObj,
                                              java.lang.String defaultDisplayName)
Gets the display name for the specified locale.

Parameters:
localeObj - the locale object.
defaultDisplayName - the default display name.
Returns:
the the display name or the default display name if not available.

getLocale

public java.util.Locale getLocale()
Gets the 'Locale' object.

Returns:
the 'Locale' object.

getLocaleFromDataString

public static java.util.Locale getLocaleFromDataString(java.lang.String dataStr)
Gets the locale for the specified data string.

Parameters:
dataStr - the data string.
Returns:
the 'Locale' or null if not found.

getLocaleFromDisplayName

public static java.util.Locale getLocaleFromDisplayName(java.lang.String displayName)
Gets the locale for the specified display name.

Parameters:
displayName - the locale display name.
Returns:
the 'Locale' or null if not found.

getCfgPropValidator

public static CfgPropValidator getCfgPropValidator()
Gets the configuration property validator.

Returns:
the 'CfgPropValidator'.

hashCode

public int hashCode()
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for this object.

setArchiveDate

public void setArchiveDate(java.util.Date dateObj)
Sets the 'Date' object representing the date to be used for archival purposes.

Parameters:
dateObj - the archive date.

toArchivedForm

public java.lang.String toArchivedForm()
Returns the archivable representation for this object. When the object is recreated from the string, it should be identical to the original.

Specified by:
toArchivedForm in interface Archivable
Returns:
A String representing the archived form of the object.

toString

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

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