Class NumericFormatFloat
java.lang.Object
com.softwaremining.wrappers.format.Format
com.softwaremining.wrappers.format.AbstractNumericFormat
com.softwaremining.wrappers.format.NumericFormatFloat
Used for representation of COMP_2 and COMP_4 variables.
COMPUTATIONAL-4 or COMP-4
Specified for internal floating-point items (single precision).
COMP-4 items are 4 bytes long. The sign is contained in the first bit
of the leftmost byte and the exponent is contained in the remaining 7
bits. The last 3 bytes contain the mantissa.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intFields inherited from class com.softwaremining.wrappers.format.AbstractNumericFormat
DECIMAL_POINT_ON_SYSTEMFields inherited from class com.softwaremining.wrappers.format.Format
additionalParamsPostfixesMap, justifiedRight, totalRuntime_convertFromDisplayToStorage, totalRuntime_getInstance -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intcalcFractionSize(String picture) final StringconvertFromDisplayToStorage(double value, boolean[] sizeError) format a value according to the PIC definitionfinal StringconvertFromDisplayToStorage(long value, boolean[] sizeError) format a value according to the PIC definitionfinal StringconvertFromDisplayToStorage(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 StringconvertFromStorageToDisplayFormat(String formattedString) intReturns the number of integer digits of used for Integer and Decimal parts of a number.intReturns the number of integer digits of used for Integer and Decimal parts of a number.final ObjectgetSQLObject(String formattedString) final intThis is the number of characters in field.final booleanMethods inherited from class com.softwaremining.wrappers.format.AbstractNumericFormat
adjustPercision, getFractionSize, getSystemDecimalPoint, isDecimal, isSignedMethods inherited from class com.softwaremining.wrappers.format.Format
assignJustifiedRight, convertFromDisplayToStorage, convertFromDisplayToStorage, convertFromDisplayToStorage, getAllFormatInstances, getInstance, getInstance, getPicture, isJustifiedRight, setPicture, toString
-
Field Details
-
MANTIS_SIZE_SHORT
public static final int MANTIS_SIZE_SHORT- See Also:
-
EXP_SIZE_SHORT
public static final int EXP_SIZE_SHORT- See Also:
-
MANTIS_SIZE_LONG
public static final int MANTIS_SIZE_LONG- See Also:
-
EXP_SIZE_LONG
public static final int EXP_SIZE_LONG- See Also:
-
-
Constructor Details
-
NumericFormatFloat
-
-
Method Details
-
calcFractionSize
-
isCompressed
public final boolean isCompressed()- Specified by:
isCompressedin classFormat
-
getStorageCellSize
public final int getStorageCellSize()Description copied from class:FormatThis 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- Specified by:
getStorageCellSizein classFormat- Returns:
- cellsize
-
getNumberOfDigits
public 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.- Specified by:
getNumberOfDigitsin classFormat- Returns:
-
getIntegerSize
public int getIntegerSize()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:
-
convertFromDisplayToStorage
format a value according to the PIC definition- Overrides:
convertFromDisplayToStoragein classFormat
-
convertFromDisplayToStorage
format a value according to the PIC definition- Specified by:
convertFromDisplayToStoragein classFormat
-
convertFromDisplayToStorage
format a value according to the PIC definition- Specified by:
convertFromDisplayToStoragein classFormat
-
convertFromDisplayToStorage
format a value according to the PIC definition- Specified by:
convertFromDisplayToStoragein classFormat
-
convertFromDisplayToStorage
format a value according to the PIC definition- Specified by:
convertFromDisplayToStoragein classFormat
-
convertFromStorageToDisplayFormat
- Specified by:
convertFromStorageToDisplayFormatin classFormat
-
getSQLObject
- Specified by:
getSQLObjectin classFormat
-