Package gnu.kawa.functions
Class ObjectFormat
java.lang.Object
java.text.Format
gnu.kawa.format.ReportFormat
gnu.kawa.functions.ObjectFormat
- All Implemented Interfaces:
Serializable,Cloneable
public class ObjectFormat
extends gnu.kawa.format.ReportFormat
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.text.Format
Format.Field -
Field Summary
Fields inherited from class gnu.kawa.format.ReportFormat
PARAM_FROM_COUNT, PARAM_FROM_LIST, PARAM_UNSPECIFIED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intformat(Object[] args, int start, Appendable dst, int maxChars, boolean readable) intformat(Object[] args, int start, Appendable dst, FieldPosition fpos) Format an array of arguments, and write out the result.static booleanformat(Object arg, Appendable dst, int maxChars, boolean readable) Return false iff truncation.static ObjectFormatgetInstance(boolean readable) parseObject(String text, ParsePosition status) Methods inherited from class gnu.kawa.format.ReportFormat
format, format, format, format, format, getParam, getParam, getParam, nextArg, print, print, result, resultCodeMethods inherited from class java.text.Format
clone, format, formatToCharacterIterator, parseObject
-
Constructor Details
-
ObjectFormat
public ObjectFormat(boolean readable) -
ObjectFormat
public ObjectFormat(boolean readable, int maxChars)
-
-
Method Details
-
getInstance
-
format
Description copied from class:gnu.kawa.format.ReportFormatFormat an array of arguments, and write out the result.- Specified by:
formatin classgnu.kawa.format.ReportFormat- Parameters:
args- the objects to be formattedstart- the index (in args) of the argument to start withdst- where to write the result- Returns:
- an integer result(resultCode, nextArg), where nextArg is the index following the last argument processed, and code is a result code (normally 0, or negative if early termination)
- Throws:
IOException
-
format
public static boolean format(Object arg, Appendable dst, int maxChars, boolean readable) throws IOException Return false iff truncation.- Parameters:
maxChars- maximum number of characters; -1 means unlimited- Throws:
IOException
-
format
public static int format(Object[] args, int start, Appendable dst, int maxChars, boolean readable) throws IOException - Throws:
IOException
-
parseObject
- Overrides:
parseObjectin classgnu.kawa.format.ReportFormat
-