Build 1.0_r1(from source)

java.text
Class DateFormatSymbols

java.lang.Object
  extended by java.text.DateFormatSymbols
All Implemented Interfaces:
Serializable, Cloneable

public class DateFormatSymbols
extends Object
implements Serializable, Cloneable

DateFormatSymbols holds the Strings used in the formating and parsing of dates and times.

See Also:
Serialized Form

Field Summary
(package private)  String[] ampms
           
(package private)  String[] eras
           
(package private)  Locale locale
          Locale, necessary to lazily load time zone strings.
(package private)  String[] months
           
(package private)  String[] shortMonths
           
(package private)  String[] shortWeekdays
           
(package private)  String[] weekdays
           
(package private)  String[][] zoneStrings
           
 
Constructor Summary
DateFormatSymbols()
          Constructs a new DateFormatSymbols containing the symbols for the default Locale.
DateFormatSymbols(Locale locale)
          Constructs a new DateFormatSymbols containing the symbols for the specified Locale.
 
Method Summary
 Object clone()
          Returns a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.
 boolean equals(Object object)
          Compares the specified object to this DateFormatSymbols and answer if they are equal.
 String[] getAmPmStrings()
          Returns the array of Strings which represent AM and PM.
 String[] getEras()
          Returns the array of Strings which represent BC and AD.
 String getLocalPatternChars()
          Returns the pattern characters used by SimpleDateFormat to specify date and time fields.
 String[] getMonths()
          Returns the array of Strings containing the full names of the months.
 String[] getShortMonths()
          Returns the array of Strings containing the abbreviated names of the months.
 String[] getShortWeekdays()
          Returns the array of Strings containing the abbreviated names of the days of the week.
 String[] getWeekdays()
          Returns the array of Strings containing the full names of the days of the week.
 String[][] getZoneStrings()
          Returns the two-dimensional array of Strings containing the names of the timezones.
 int hashCode()
          Returns an integer hash code for the receiver.
(package private)  String[][] internalZoneStrings()
          Gets zone strings, initializing them if necessary.
 void setAmPmStrings(String[] data)
          Sets the array of Strings which represent AM and PM.
 void setEras(String[] data)
          Sets the array of Strings which represent BC and AD.
 void setLocalPatternChars(String data)
          Sets the pattern characters used by SimpleDateFormat to specify date and time fields.
 void setMonths(String[] data)
          Sets the array of Strings containing the full names of the months.
 void setShortMonths(String[] data)
          Sets the array of Strings containing the abbreviated names of the months.
 void setShortWeekdays(String[] data)
          Sets the array of Strings containing the abbreviated names of the days of the week.
 void setWeekdays(String[] data)
          Sets the array of Strings containing the full names of the days of the week.
 void setZoneStrings(String[][] data)
          Sets the two-dimensional array of Strings containing the names of the timezones.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ampms

String[] ampms

eras

String[] eras

months

String[] months

shortMonths

String[] shortMonths

shortWeekdays

String[] shortWeekdays

weekdays

String[] weekdays

zoneStrings

String[][] zoneStrings

locale

final transient Locale locale
Locale, necessary to lazily load time zone strings. We force the time zone names to load upon serialization, so this will never be needed post deserialization.

Constructor Detail

DateFormatSymbols

public DateFormatSymbols()
Constructs a new DateFormatSymbols containing the symbols for the default Locale.


DateFormatSymbols

public DateFormatSymbols(Locale locale)
Constructs a new DateFormatSymbols containing the symbols for the specified Locale.

Parameters:
locale - the Locale
Method Detail

internalZoneStrings

String[][] internalZoneStrings()
Gets zone strings, initializing them if necessary. Does not create a defensive copy, so make sure you do so before exposing the returned arrays to clients.


clone

public Object clone()
Description copied from class: Object
Returns a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.

Classes which wish to support cloning must specify that they implement the Cloneable interface, since the implementation checks for this.

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

equals

public boolean equals(Object object)
Compares the specified object to this DateFormatSymbols and answer if they are equal. The object must be an instance of DateFormatSymbols with the same symbols.

Overrides:
equals in class Object
Parameters:
object - the object to compare with this object
Returns:
true if the specified object is equal to this DateFormatSymbols, false otherwise
See Also:
hashCode()

getAmPmStrings

public String[] getAmPmStrings()
Returns the array of Strings which represent AM and PM. Use the Calendar constants Calendar.AM and Calendar.PM to index into the array.

Returns:
an array of String

getEras

public String[] getEras()
Returns the array of Strings which represent BC and AD. Use the Calendar constants GregorianCalendar.BC and GregorianCalendar.AD to index into the array.

Returns:
an array of String

getLocalPatternChars

public String getLocalPatternChars()
Returns the pattern characters used by SimpleDateFormat to specify date and time fields.

Returns:
a String containing the pattern characters

getMonths

public String[] getMonths()
Returns the array of Strings containing the full names of the months. Use the Calendar constants Calendar.JANUARY, etc. to index into the array.

Returns:
an array of String

getShortMonths

public String[] getShortMonths()
Returns the array of Strings containing the abbreviated names of the months. Use the Calendar constants Calendar.JANUARY, etc. to index into the array.

Returns:
an array of String

getShortWeekdays

public String[] getShortWeekdays()
Returns the array of Strings containing the abbreviated names of the days of the week. Use the Calendar constants Calendar.SUNDAY, etc. to index into the array.

Returns:
an array of String

getWeekdays

public String[] getWeekdays()
Returns the array of Strings containing the full names of the days of the week. Use the Calendar constants Calendar.SUNDAY, etc. to index into the array.

Returns:
an array of String

getZoneStrings

public String[][] getZoneStrings()
Returns the two-dimensional array of Strings containing the names of the timezones. Each element in the array is an array of five Strings, the first is a TimeZone ID, and second and third are the full and abbreviated timezone names for standard time, and the fourth and fifth are the full and abbreviated names for daylight time.

Returns:
a two-dimensional array of String

hashCode

public int hashCode()
Returns an integer hash code for the receiver. Objects which are equal answer the same value for this method.

Overrides:
hashCode in class Object
Returns:
the receiver's hash
See Also:
equals(java.lang.Object)

setAmPmStrings

public void setAmPmStrings(String[] data)
Sets the array of Strings which represent AM and PM. Use the Calendar constants Calendar.AM and Calendar.PM to index into the array.

Parameters:
data - the array of Strings

setEras

public void setEras(String[] data)
Sets the array of Strings which represent BC and AD. Use the Calendar constants GregorianCalendar.BC and GregorianCalendar.AD to index into the array.

Parameters:
data - the array of Strings

setLocalPatternChars

public void setLocalPatternChars(String data)
Sets the pattern characters used by SimpleDateFormat to specify date and time fields.

Parameters:
data - the String containing the pattern characters
Throws:
NullPointerException - when the data is null

setMonths

public void setMonths(String[] data)
Sets the array of Strings containing the full names of the months. Use the Calendar constants Calendar.JANUARY, etc. to index into the array.

Parameters:
data - the array of Strings

setShortMonths

public void setShortMonths(String[] data)
Sets the array of Strings containing the abbreviated names of the months. Use the Calendar constants Calendar.JANUARY, etc. to index into the array.

Parameters:
data - the array of Strings

setShortWeekdays

public void setShortWeekdays(String[] data)
Sets the array of Strings containing the abbreviated names of the days of the week. Use the Calendar constants Calendar.SUNDAY, etc. to index into the array.

Parameters:
data - the array of Strings

setWeekdays

public void setWeekdays(String[] data)
Sets the array of Strings containing the full names of the days of the week. Use the Calendar constants Calendar.SUNDAY, etc. to index into the array.

Parameters:
data - the array of Strings

setZoneStrings

public void setZoneStrings(String[][] data)
Sets the two-dimensional array of Strings containing the names of the timezones. Each element in the array is an array of five Strings, the first is a TimeZone ID, and second and third are the full and abbreviated timezone names for standard time, and the fourth and fifth are the full and abbreviated names for daylight time.

Parameters:
data - the two-dimensional array of Strings

Build 1.0_r1(from source)

Please submit a feedback, bug or feature