java.lang.Object
io.sf.jclf.text.format.ObjectFormat
io.sf.jclf.text.format.NumberFormat
- All Implemented Interfaces:
Alignable
- Direct Known Subclasses:
FloatFormat,HexFormat,IntegerFormat,OctalFormat
Abstract class for Number-realted object formats.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected charprotected booleanFields inherited from class io.sf.jclf.text.format.ObjectFormat
flags, precision, ralign, width -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected longprotected final StringroundNumber(Number num) protected booleansetFlag(char flag, int i) Sets the flags specific to this Class.protected charSets the format of the object.Methods inherited from class io.sf.jclf.text.format.ObjectFormat
align, create, create, create, expandLeftToWidth, expandRightToWidth, format, getAlignment, rightAppend, sample, setFlags
-
Field Details
-
tipo
protected char tipo -
signpre
protected boolean signpre -
blankpre
protected boolean blankpre -
zeropadding
protected boolean zeropadding
-
-
Constructor Details
-
NumberFormat
protected NumberFormat()
-
-
Method Details
-
setFormat
Description copied from class:ObjectFormatSets the format of the object.- Overrides:
setFormatin classObjectFormat- Parameters:
format- the format.- Returns:
- the format type
- Throws:
SpecParsingException- if the format contains unknown or wrong format specs.
-
setFlag
protected boolean setFlag(char flag, int i) Description copied from class:ObjectFormatSets the flags specific to this Class.- Overrides:
setFlagin classObjectFormat- Parameters:
flag- the flagi- the position of the flag in the flags String- Returns:
trueif the flag was understood,falseotherwise.
-
getRoundingFactor
protected long getRoundingFactor() -
roundNumber
-