Class NumericFormatCompressed
java.lang.Object
com.softwaremining.wrappers.format.Format
com.softwaremining.wrappers.format.AbstractNumericFormat
com.softwaremining.wrappers.format.NumericFormat
com.softwaremining.wrappers.format.NumericFormatCompressed
- Direct Known Subclasses:
NumericFormatBinary
,NumericFormatBinaryX
,NumericFormatDouble
,NumericFormatPackedDecimal
-
Field Summary
Fields inherited from class com.softwaremining.wrappers.format.NumericFormat
P_onLeft, P_onRight, P_Size
Fields inherited from class com.softwaremining.wrappers.format.AbstractNumericFormat
DECIMAL_POINT_ON_SYSTEM
Fields inherited from class com.softwaremining.wrappers.format.Format
additionalParamsPostfixesMap, justifiedRight, totalRuntime_convertFromDisplayToStorage, totalRuntime_getInstance
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract String
convertFromCompressedStorageToDisplayFormat
(String formattedString) Convert from Storage-Compressed to Display This methods returns the actual stored value, even it is bigger than the defined format.convertFromDisplayToStorage
(double value, boolean[] sizeError) format a value according to the PIC definitionconvertFromDisplayToStorage
(String _value, boolean[] sizeError) format a value according to the PIC definitionconvertFromDisplayToStorage
(BigDecimal value, boolean[] sizeError) format a value according to the PIC definitionconvertFromDisplayToStorage
(BigInteger value, boolean[] sizeError) format a value according to the PIC definitionfinal boolean
Methods inherited from class com.softwaremining.wrappers.format.NumericFormat
getIntegerSize, getNumberOfDigits, getSQLObject, getStorageCellSize
Methods inherited from class com.softwaremining.wrappers.format.AbstractNumericFormat
adjustPercision, getFractionSize, getSystemDecimalPoint, isDecimal, isSigned
Methods inherited from class com.softwaremining.wrappers.format.Format
assignJustifiedRight, convertFromDisplayToStorage, convertFromDisplayToStorage, convertFromDisplayToStorage, convertFromDisplayToStorage, convertFromStorageToDisplayFormat, getAllFormatInstances, getInstance, getInstance, getPicture, isJustifiedRight, toString
-
Constructor Details
-
NumericFormatCompressed
-
-
Method Details
-
isCompressed
public final boolean isCompressed()- Specified by:
isCompressed
in classFormat
-
convertFromCompressedStorageToDisplayFormat
Convert from Storage-Compressed to Display This methods returns the actual stored value, even it is bigger than the defined format.
E.g. PIC 9(2) COMP can store a value of 30000 ! This method will return "30000", but convertFromStorageToDisplayFormat will return "30".- Parameters:
formattedString
-- Returns:
-
convertFromDisplayToStorage
format a value according to the PIC definition- Specified by:
convertFromDisplayToStorage
in classFormat
-
convertFromDisplayToStorage
format a value according to the PIC definition- Specified by:
convertFromDisplayToStorage
in classFormat
-
convertFromDisplayToStorage
format a value according to the PIC definition- Specified by:
convertFromDisplayToStorage
in classFormat
-
convertFromDisplayToStorage
format a value according to the PIC definition- Specified by:
convertFromDisplayToStorage
in classFormat
-