info.informatica.text.format
Class TemplateDateFormat

java.lang.Object
  extended by info.informatica.text.format.ObjectFormat
      extended by info.informatica.text.format.TemplateDateFormat
All Implemented Interfaces:
Alignable

public final class TemplateDateFormat
extends ObjectFormat

Formats dates.

Version:
1.03
Author:
amengual at informatica dot info

Field Summary
 
Fields inherited from interface info.informatica.doc.style.Alignable
CENTER, JUSTIFY, LEFT, RIGHT, UNDETERMINED
 
Constructor Summary
TemplateDateFormat()
           
 
Method Summary
 String format(Object o)
          Formats an object according to the format specification set by setFormat.
 DateFormat getDateFormat()
           
 Object sample()
          Produce a sample of this format.
 String toString()
           
 
Methods inherited from class info.informatica.text.format.ObjectFormat
align, create, create, create, getAlignment
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TemplateDateFormat

public TemplateDateFormat()
Method Detail

format

public String format(Object o)
Description copied from class: ObjectFormat
Formats an object according to the format specification set by setFormat.

Must be overriden by subclasses.

Specified by:
format in class ObjectFormat

getDateFormat

public DateFormat getDateFormat()

toString

public String toString()
Overrides:
toString in class Object

sample

public Object sample()
Description copied from class: ObjectFormat
Produce a sample of this format.

Specified by:
sample in class ObjectFormat
Returns:
a String with a (more or less) random object appropriate to be formatted according to current format specifications.