Methods Summary |
---|
public boolean | equals(java.lang.Object obj)Overrides equals
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
synchronized(internalDateFormat) {
return internalDateFormat.equals(obj);
}
|
public java.lang.String | format(java.util.Date d)SimpleDateFormat will handle most of this for us, but we
want to ensure thread safety, so we wrap the call in a
synchronized block.
synchronized (internalDateFormat) {
return internalDateFormat.format(d);
}
|
public java.util.TimeZone | getTimeZone()Gets the time zone.
synchronized(internalDateFormat) {
return internalDateFormat.getTimeZone();
}
|
public int | hashCode()Overrides hashCode
synchronized(internalDateFormat) {
return internalDateFormat.hashCode();
}
|
public boolean | isLenient()Tell whether date/time parsing is to be lenient.
synchronized(internalDateFormat) {
return internalDateFormat.isLenient();
}
|
public java.util.Date | parse(java.lang.String source)Parses text from the beginning of the given string to produce a date.
The method may not use the entire text of the given string.
This method is designed to be thread safe, so we wrap our delegated
parse method in an appropriate synchronized block.
synchronized (internalDateFormat) {
return internalDateFormat.parse(source);
}
|
public void | setLenient(boolean lenient)Specify whether or not date/time parsing is to be lenient. With
lenient parsing, the parser may use heuristics to interpret inputs that
do not precisely match this object's format. With strict parsing,
inputs must match this object's format.
synchronized(internalDateFormat) {
internalDateFormat.setLenient(lenient);
}
|
public void | setTimeZone(java.util.TimeZone zone)Sets the time zone of this SynchronizedDateFormat object.
synchronized(internalDateFormat) {
internalDateFormat.setTimeZone(zone);
}
|