com.darwinsys.lang
Class StringFormat
java.lang.Object
java.text.Format
com.darwinsys.lang.StringFormat
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class StringFormat
- extends java.text.Format
Bare-minimum "String formatter": format a string to a given
maximum length with left, centre, or right justification.
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class java.text.Format |
java.text.Format.Field |
Method Summary |
java.lang.StringBuffer |
format(java.lang.Object obj,
java.lang.StringBuffer where,
java.text.FieldPosition ignore)
Format a String |
protected void |
pad(java.lang.StringBuffer to,
int howMany)
|
java.lang.Object |
parseObject(java.lang.String source,
java.text.ParsePosition pos)
ParseObject is required by Format interface,
but not useful here. |
Methods inherited from class java.text.Format |
clone, format, formatToCharacterIterator, parseObject |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JUST_LEFT
public static final int JUST_LEFT
- See Also:
- Constant Field Values
JUST_CENTRE
public static final int JUST_CENTRE
- See Also:
- Constant Field Values
JUST_CENTER
public static final int JUST_CENTER
- See Also:
- Constant Field Values
JUST_RIGHT
public static final int JUST_RIGHT
- Constant for right-justified Strings.
- See Also:
- Constant Field Values
StringFormat
public StringFormat(int maxCh,
int justn)
format
public java.lang.StringBuffer format(java.lang.Object obj,
java.lang.StringBuffer where,
java.text.FieldPosition ignore)
- Format a String
- Specified by:
format
in class java.text.Format
pad
protected final void pad(java.lang.StringBuffer to,
int howMany)
parseObject
public java.lang.Object parseObject(java.lang.String source,
java.text.ParsePosition pos)
- ParseObject is required by Format interface,
but not useful here.
- Specified by:
parseObject
in class java.text.Format
Copyright © 1996-2004 Ian F. Darwin. See license.html for usage license.