Class Format
java.lang.Object
com.softwaremining.wrappers.format.Format
- Direct Known Subclasses:
AbstractNumericFormat
,AlphaNumericFormat
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
static long
static long
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
assignJustifiedRight
(boolean justifiedRight) convertFromDisplayToStorage
(double value) protected abstract String
convertFromDisplayToStorage
(double value, boolean[] sizeError) format a value according to the PIC definitionconvertFromDisplayToStorage
(long value, boolean[] sizeError) format a value according to the PIC definitionfinal String
convertFromDisplayToStorage
(Object value, boolean[] sizeError) format a value according to the PIC definitionformat a value according to the PIC definitionabstract String
convertFromDisplayToStorage
(String value, boolean[] sizeError) format a value according to the PIC definitionabstract String
convertFromDisplayToStorage
(BigDecimal value, boolean[] sizeError) abstract String
convertFromDisplayToStorage
(BigInteger value, boolean[] sizeError) abstract String
convertFromStorageToDisplayFormat
(String formattedString) protected static Collection
<Format> static Format
getInstance
(char[] picture, int additionalParam) static Format
getInstance
(String picture, int additionalParam) abstract int
Returns the number of integer digits of used for Integer and Decimal parts of a number.char[]
abstract Object
getSQLObject
(String formattedString) abstract int
This is the number of characters in field.abstract boolean
final boolean
toString()
-
Field Details
-
totalRuntime_getInstance
public static long totalRuntime_getInstance -
totalRuntime_convertFromDisplayToStorage
public static long totalRuntime_convertFromDisplayToStorage -
justifiedRight
protected boolean justifiedRight -
additionalParamsPostfixesMap
-
-
Constructor Details
-
Format
protected Format(char[] picture) constructor- Parameters:
picture
-
-
-
Method Details
-
getPicture
public char[] getPicture() -
convertFromDisplayToStorage
format a value according to the PIC definition -
convertFromDisplayToStorage
format a value according to the PIC definition -
convertFromDisplayToStorage
format a value according to the PIC definition -
convertFromDisplayToStorage
format a value according to the PIC definition -
convertFromDisplayToStorage
-
convertFromDisplayToStorage
format a value according to the PIC definition -
convertFromDisplayToStorage
-
convertFromDisplayToStorage
-
convertFromStorageToDisplayFormat
-
getStorageCellSize
public abstract int getStorageCellSize()This is the number of characters in field.
For example, PIC X(10) will have 10 characters
or PIC 9(16) will have 16 characters
but PIC 9(16) COMP-3 will have 8 characters- Returns:
- cellsize
-
isCompressed
public abstract boolean isCompressed() -
getSQLObject
-
getInstance
-
getInstance
-
getAllFormatInstances
-
assignJustifiedRight
public final void assignJustifiedRight(boolean justifiedRight) -
isJustifiedRight
public final boolean isJustifiedRight() -
getNumberOfDigits
public abstract int getNumberOfDigits()Returns the number of integer digits of used for Integer and Decimal parts of a number. For example, given a definition of S9(5)v9(3); the NumberOfDigists is 11.- Returns:
-
toString
-