java.lang.Object
io.sf.jclf.text.format.ObjectFormat
io.sf.jclf.text.format.TemplateDateFormat
- All Implemented Interfaces:
Alignable
Formats dates.
-
Field Summary
Fields inherited from class io.sf.jclf.text.format.ObjectFormat
flags, precision, ralign, width
-
Constructor Summary
-
Method Summary
Methods inherited from class io.sf.jclf.text.format.ObjectFormat
align, create, create, create, expandLeftToWidth, expandRightToWidth, getAlignment, rightAppend, setFlag
-
Constructor Details
-
TemplateDateFormat
public TemplateDateFormat()
-
-
Method Details
-
setFormat
Description copied from class:ObjectFormat
Sets the format of the object.- Overrides:
setFormat
in classObjectFormat
- Parameters:
format
- the format.- Returns:
- the format type
- Throws:
SpecParsingException
- if the format contains unknown or wrong format specs.
-
setFlags
protected void setFlags(char[] flags) - Overrides:
setFlags
in classObjectFormat
-
format
Description copied from class:ObjectFormat
Formats an object according to the format specification set bysetFormat
.Must be overriden by subclasses.
- Specified by:
format
in classObjectFormat
- Parameters:
o
- the object to be formatted.- Returns:
- a string with the formatted object.
-
getDateFormat
-
toString
-
sample
Description copied from class:ObjectFormat
Produce a sample of this format.- Specified by:
sample
in classObjectFormat
- Returns:
- a String with a (more or less) random object appropriate to be formatted according to current format specifications.
-