Package com.softwaremining.wrappers
Class AbstractCBLNumeric
java.lang.Object
com.softwaremining.wrappers.AbstractCBLField
com.softwaremining.wrappers.AbstractCBLPrimitive
com.softwaremining.wrappers.AbstractCBLNumeric
- All Implemented Interfaces:
AbstractDataObject
,IFormatTypes
,ICBLContainer
,ICBLDataType
,IFieldContainer
,ISMDataType
,ISMNumeric
,ISMObject
- Direct Known Subclasses:
CBLDouble
,CBLInteger
,CBLLong
public abstract class AbstractCBLNumeric
extends AbstractCBLPrimitive
implements ISMObject, ISMNumeric
For internal use only
-
Field Summary
Fields inherited from class com.softwaremining.wrappers.AbstractCBLField
format, log, NEEDS_FORMATING, readjustIndex_counter, resetWrapperOffsetCount, STRINGIFY_BEFORE_FORMATTING, totalRuntime_ACMFieldConstructor, totalRuntime_arrayUtilityReadjustIndex, totalRuntime_cachingTime, totalRuntime_getSubField, totalRuntime_getSubField_createSubField, totalRuntime_getSubField_createSubField_count, totalRuntime_getSubField_setSubFieldHelper, totalRuntime_getSubFieldHelper, totalruntime_getSubFields_b, totalRuntime_getWrapperOffset, totalRuntime_resetWrapperOffset, totalRuntime_setInternalValue, wrapperOffsetCount
Fields inherited from interface com.softwaremining.wrappers.format.IFormatTypes
COMP_MODE_COMP, COMP_MODE_COMP_1, COMP_MODE_COMP_2, COMP_MODE_COMP_3, COMP_MODE_COMP_4, COMP_MODE_COMP_5, COMP_MODE_COMP_6, COMP_MODE_COMP_7, COMP_MODE_COMP_8, COMP_MODE_COMP_MCP, COMP_MODE_COMP_X, COMP_MODE_DISPLAY, COMP_MODE_DISPLAY_SIGN_IS_LEADING, COMP_MODE_DISPLAY_SIGN_IS_SEPARATE_LEADING, COMP_MODE_DISPLAY_SIGN_IS_SEPARATE_TRAILING, COMP_MODE_DISPLAY_SIGN_IS_TRAILING, COMP_MODE_IDS_DB_KEY, COMP_MODE_NATIVE_2, COMP_MODE_NATIVE_4, COMP_MODE_NATIVE_8, COMP_MODE_REAL, COMP_MODE_UNSUPPORTED, JUSTIFIED_RIGHT_FALSE, JUSTIFIED_RIGHT_TRUE
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractCBLNumeric
(AbstractCBLNumeric parent, int[] index) protected
AbstractCBLNumeric
(AbstractCBLPrimitive parent, int[] index) AbstractCBLNumeric
(String name, int[] theDim, String picture, CBLBean wrapper, int compMode) -
Method Summary
Modifier and TypeMethodDescriptionfinal void
assignValue
(AbstractCBLField field) Set value of the objectfinal void
assignValue
(AbstractCBLField field, int[] indexes) Method Used internally by framework Set value of the objectfinal BigDecimal
final BigInteger
final int
compareTo
(BigDecimal value) final double
final boolean
equals
(double value) if field1 == field2final boolean
equals
(int value) if field1 == field2final boolean
equals
(long value) if field1 == field2boolean
check against 88-RangeItemsfinal boolean
if field1 == field2final boolean
equals
(BigDecimal value) final double[]
SAS 11.03.2009 returns table as an array of valuesfinal int
final Number
final Object
final Object
final int
getValue()
Deprecated.- use retrieveAsIntfinal int
intValue()
final int
intValue
(int[] indexes) final boolean
Is object filled with 'filler'final boolean
isGreaterOrEqualTo
(double value) compare values of this field with the target fieldfinal boolean
isGreaterOrEqualTo
(int value) compare values of this field with the target fieldfinal boolean
isGreaterOrEqualTo
(long value) compare values of this field with the target fieldfinal boolean
isGreaterOrEqualTo
(ISMNumeric value) final boolean
isGreaterOrEqualTo
(String value) compare values of this field with the target fieldfinal boolean
isGreaterOrEqualTo
(BigDecimal value) compare values of this field with the target fieldfinal boolean
isGreaterThan
(double value) compare values of this field with the target fieldfinal boolean
isGreaterThan
(int value) compare values of this field with the target fieldfinal boolean
isGreaterThan
(long value) compare values of this field with the target fieldfinal boolean
isGreaterThan
(ISMNumeric value) final boolean
isGreaterThan
(String value) compare values of this field with the target fieldfinal boolean
isGreaterThan
(BigDecimal value) compare values of this field with the target fieldfinal boolean
isLessOrEqualTo
(double value) compare values of this field with the target fieldfinal boolean
isLessOrEqualTo
(int value) compare values of this field with the target fieldfinal boolean
isLessOrEqualTo
(long value) compare values of this field with the target fieldfinal boolean
isLessOrEqualTo
(ISMNumeric value) final boolean
isLessOrEqualTo
(String value) compare values of this field with the target fieldfinal boolean
isLessOrEqualTo
(BigDecimal value) compare values of this field with the target fieldfinal boolean
isLessThan
(double value) compare values of this field with the target fieldfinal boolean
isLessThan
(int value) compare values of this field with the target fieldfinal boolean
isLessThan
(long value) compare values of this field with the target fieldfinal boolean
isLessThan
(ISMNumeric value) final boolean
isLessThan
(String value) compare values of this field with the target fieldfinal boolean
isLessThan
(BigDecimal value) compare values of this field with the target fieldfinal long
final long
longValue
(int[] indexes) final BigDecimal
final BigDecimal
retrieveAsBigDecimal
(int index) final BigDecimal
retrieveAsBigDecimal
(int[] indexes) final BigInteger
final double
final double
retrieveAsDouble
(int index) final double
retrieveAsDouble
(int[] indexes) final int
final int
retrieveAsInt
(int arrayElement) Arrayed Accessor - for single dimenSion arrays.final int
retrieveAsInt
(int[] indexes) final int
retrieveAsInt
(int arrayElement1, int arrayElement2) Arrayed Accessor - for two dimenSion arraysfinal long
final long
retrieveAsLong
(int index) final long
retrieveAsLong
(int[] indexes) final void
setRound
(double doubleVal) Support for COBOL's ROUNDED statement.final void
setRound
(BigDecimal bigDecimal) Support for COBOL's ROUNDED statement.Methods inherited from class com.softwaremining.wrappers.AbstractCBLPrimitive
bytesSize, getPicture, initialize, initialize, isGroup, pad, pad, resetDimensionByIndx, retrieveField, retrieveSQLObject, setObjectAsString
Methods inherited from class com.softwaremining.wrappers.AbstractCBLField
addDependedField, assignAddressTo, assignBean, assignBigDecimal, assignDefaultValue, assignDefaultValue, assignDependingField, assignDouble, assignExcludeFromSQLTable, assignExternal, assignGroup, assignHighValues, assignHighValues, assignInt, assignLong, assignLowValues, assignLowValues, assignMasterSQLColumnsForArrays, assignObject, assignOverrideSQLTableName, assignPointerOffset, assignRedefines, assignRedefines, assignSeparateColumn, assignSeparateTable, assignString, assignString, assignStringFormatted, assignStringFormatted, assignSubstring, assignSubstring, assignSubstring, assignSubstring, assignSubstring, assignSubstringDeprecated, assignToAddressOf, assignToAddressOf, assignToAddressOf, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValueUnFormatted, createSubField, enableSizeErrDetectionOnNextOp, equals, equals, equalsRightTrimmed, fetchParentArray, fill, fill, fill, fill, fill, getAllSubFields, getArrayLength, getAsString, getCachedValue, getDefaultValue, getDependedFieldsList, getDimensions, getFormat, getMemoryPosition, getNumberOfSQLColumns, getNumOccurs, getObject, getOffsets, getParentGroup, getRedefines, getReverseRedefines, getSubFields, incrementPointerOffset, invokeSizeError, isArrayOfArrays, isBMSString, isCachable, isCachedArrayLengthActual, isCacheStateOK, isEmpty, isEqualToAll, isExcludedFromSQLTable, isFilled, isFilled, isFilled, isFiller, isGreaterOrEqualTo, isGreaterThan, isGreaterThan, isGreaterThan, isHighValues, isLessOrEqualTo, isLessThan, isLowValues, isSeparateColumns, isSeparateTable, isSpaces, isSubField, isUsedInRedefines, isZeros, lengthOf, onSizeError, printDetailAndValue, printDetails, redefinesAnotherField, resetCachedValue, retrieveAsString, retrieveAsString, retrieveAsStringFormatted, retrieveAsStringFormatted, retrieveMasterSQLColumnsForArrays, retrieveName, retrieveObject, retrieveSQLObject, retrieveSQLTableNameOverride, retrieveStorageCellSize, retrieveStorageChars, retrieveStorageChars, retrieveSubField, retrieveSubstring, retrieveSubstring, retrieveWrapper, setBlankWhenZero, setCachedValue, setHighValues, setHighValues, setLowValues, setLowValues, setNumberOfSQLColumns, setNumOccurs, setOmitted, setParentGroup, setSeparateColumn, setSeparateTable, setSubstring, setSubstring, setSubstring, setSubstring, setWrapper, stringValue, toEbcdic, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.softwaremining.wrappers.ISMDataType
stringValue
Methods inherited from interface com.softwaremining.wrappers.ISMNumeric
assignValue, getFormat, lengthOf
Methods inherited from interface com.softwaremining.wrappers.ISMObject
assignExcludeFromSQLTable, assignMasterSQLColumnsForArrays, assignObject, assignOverrideSQLTableName, assignString, assignStringFormatted, assignSubstring, assignValue, bytesSize, fill, initialize, isExcludedFromSQLTable, isFiller, retrieveAsString, retrieveAsStringFormatted, retrieveMasterSQLColumnsForArrays, retrieveName, retrieveObject, retrieveSQLObject, retrieveSQLObject, retrieveSQLTableNameOverride, retrieveStorageCellSize, retrieveSubField, retrieveWrapper
-
Constructor Details
-
AbstractCBLNumeric
-
AbstractCBLNumeric
-
AbstractCBLNumeric
-
-
Method Details
-
setRound
Support for COBOL's ROUNDED statement. E.g. Subtract A from B ROUNDED this version uses the bigDecimal.doubleValue() ... so digits may get lost- Parameters:
bigDecimal
-
-
setRound
public final void setRound(double doubleVal) Support for COBOL's ROUNDED statement. E.g. Subtract A from B ROUNDED- Specified by:
setRound
in interfaceISMNumeric
- Parameters:
doubleVal
-
-
getDefaultSpecialValue
public final int getDefaultSpecialValue() -
retrieveAsInt
public final int retrieveAsInt() -
retrieveAsInt
public final int retrieveAsInt(int[] indexes) -
retrieveAsInt
public final int retrieveAsInt(int arrayElement1, int arrayElement2) Arrayed Accessor - for two dimenSion arrays- Parameters:
arrayElement1
- - first array elementarrayElement2
- - 2nd array element- Returns:
-
retrieveAsInt
public final int retrieveAsInt(int arrayElement) Arrayed Accessor - for single dimenSion arrays.- Parameters:
arrayElement
- - arrayElement- Returns:
-
getValue
public final int getValue()Deprecated.- use retrieveAsIntGeneric Accessor- Returns:
- current value
-
intValue
public final int intValue() -
intValue
public final int intValue(int[] indexes) -
getAsArray
public final double[] getAsArray()SAS 11.03.2009 returns table as an array of values- Returns:
- array of field values
-
retrieveAsDouble
public final double retrieveAsDouble(int[] indexes) -
retrieveAsDouble
public final double retrieveAsDouble(int index) -
doubleValue
public final double doubleValue()- Specified by:
doubleValue
in interfaceISMNumeric
-
retrieveAsDouble
public final double retrieveAsDouble()- Specified by:
retrieveAsDouble
in interfaceISMNumeric
-
retrieveAsBigDecimal
-
retrieveAsBigDecimal
-
retrieveAsBigDecimal
-
bigDecimalValue
-
retrieveAsLong
public final long retrieveAsLong(int index) -
retrieveAsLong
public final long retrieveAsLong(int[] indexes) -
retrieveAsLong
public final long retrieveAsLong() -
longValue
public final long longValue(int[] indexes) -
longValue
public final long longValue() -
retrieveAsBigInteger
-
bigIntegerValue
-
assignValue
Description copied from class:AbstractCBLField
Set value of the object- Overrides:
assignValue
in classAbstractCBLField
-
assignValue
Description copied from class:AbstractCBLField
Method Used internally by framework Set value of the object- Overrides:
assignValue
in classAbstractCBLField
-
getObject
-
getObjectNoLeftCut
-
isFilled
Description copied from class:AbstractCBLField
Is object filled with 'filler'- Overrides:
isFilled
in classAbstractCBLField
-
getNumber
- Specified by:
getNumber
in interfaceISMNumeric
-
equals
public final boolean equals(int value) Description copied from class:AbstractCBLField
if field1 == field2- Overrides:
equals
in classAbstractCBLField
- Parameters:
value
-- Returns:
-
equals
public final boolean equals(double value) Description copied from class:AbstractCBLField
if field1 == field2- Overrides:
equals
in classAbstractCBLField
- Parameters:
value
-- Returns:
-
equals
public final boolean equals(long value) Description copied from class:AbstractCBLField
if field1 == field2- Overrides:
equals
in classAbstractCBLField
- Parameters:
value
-- Returns:
-
equals
Description copied from class:AbstractCBLField
if field1 == field2- Overrides:
equals
in classAbstractCBLField
- Parameters:
value
-- Returns:
-
equals
check against 88-RangeItems- Overrides:
equals
in classAbstractCBLField
-
equals
-
isGreaterThan
public final boolean isGreaterThan(double value) Description copied from class:AbstractCBLField
compare values of this field with the target field- Specified by:
isGreaterThan
in interfaceISMNumeric
- Overrides:
isGreaterThan
in classAbstractCBLField
- Parameters:
value
-- Returns:
-
isGreaterThan
public final boolean isGreaterThan(int value) Description copied from class:AbstractCBLField
compare values of this field with the target field- Specified by:
isGreaterThan
in interfaceISMNumeric
- Overrides:
isGreaterThan
in classAbstractCBLField
- Parameters:
value
-- Returns:
-
isGreaterThan
public final boolean isGreaterThan(long value) Description copied from class:AbstractCBLField
compare values of this field with the target field- Specified by:
isGreaterThan
in interfaceISMNumeric
- Overrides:
isGreaterThan
in classAbstractCBLField
- Parameters:
value
-- Returns:
-
isGreaterThan
- Specified by:
isGreaterThan
in interfaceISMNumeric
-
isGreaterThan
Description copied from class:AbstractCBLField
compare values of this field with the target field- Specified by:
isGreaterThan
in interfaceISMNumeric
- Overrides:
isGreaterThan
in classAbstractCBLField
- Parameters:
value
-- Returns:
-
isGreaterThan
Description copied from class:AbstractCBLField
compare values of this field with the target field- Specified by:
isGreaterThan
in interfaceISMNumeric
- Overrides:
isGreaterThan
in classAbstractCBLField
- Parameters:
value
-- Returns:
-
isGreaterOrEqualTo
public final boolean isGreaterOrEqualTo(int value) Description copied from class:AbstractCBLField
compare values of this field with the target field- Specified by:
isGreaterOrEqualTo
in interfaceISMNumeric
- Overrides:
isGreaterOrEqualTo
in classAbstractCBLField
- Parameters:
value
-- Returns:
-
isGreaterOrEqualTo
public final boolean isGreaterOrEqualTo(double value) Description copied from class:AbstractCBLField
compare values of this field with the target field- Specified by:
isGreaterOrEqualTo
in interfaceISMNumeric
- Overrides:
isGreaterOrEqualTo
in classAbstractCBLField
- Parameters:
value
-- Returns:
-
isGreaterOrEqualTo
public final boolean isGreaterOrEqualTo(long value) Description copied from class:AbstractCBLField
compare values of this field with the target field- Specified by:
isGreaterOrEqualTo
in interfaceISMNumeric
- Overrides:
isGreaterOrEqualTo
in classAbstractCBLField
- Parameters:
value
-- Returns:
-
isGreaterOrEqualTo
- Specified by:
isGreaterOrEqualTo
in interfaceISMNumeric
-
isGreaterOrEqualTo
Description copied from class:AbstractCBLField
compare values of this field with the target field- Specified by:
isGreaterOrEqualTo
in interfaceISMNumeric
- Overrides:
isGreaterOrEqualTo
in classAbstractCBLField
- Parameters:
value
-- Returns:
-
isGreaterOrEqualTo
Description copied from class:AbstractCBLField
compare values of this field with the target field- Specified by:
isGreaterOrEqualTo
in interfaceISMNumeric
- Overrides:
isGreaterOrEqualTo
in classAbstractCBLField
- Parameters:
value
-- Returns:
-
compareTo
-
isLessThan
public final boolean isLessThan(int value) Description copied from class:AbstractCBLField
compare values of this field with the target field- Overrides:
isLessThan
in classAbstractCBLField
- Parameters:
value
-- Returns:
-
isLessThan
public final boolean isLessThan(double value) Description copied from class:AbstractCBLField
compare values of this field with the target field- Specified by:
isLessThan
in interfaceISMNumeric
- Overrides:
isLessThan
in classAbstractCBLField
- Parameters:
value
-- Returns:
-
isLessThan
public final boolean isLessThan(long value) Description copied from class:AbstractCBLField
compare values of this field with the target field- Specified by:
isLessThan
in interfaceISMNumeric
- Overrides:
isLessThan
in classAbstractCBLField
- Parameters:
value
-- Returns:
-
isLessThan
- Specified by:
isLessThan
in interfaceISMNumeric
-
isLessThan
Description copied from class:AbstractCBLField
compare values of this field with the target field- Specified by:
isLessThan
in interfaceISMNumeric
- Overrides:
isLessThan
in classAbstractCBLField
- Parameters:
value
-- Returns:
-
isLessThan
Description copied from class:AbstractCBLField
compare values of this field with the target field- Specified by:
isLessThan
in interfaceISMNumeric
- Overrides:
isLessThan
in classAbstractCBLField
- Parameters:
value
-- Returns:
-
isLessOrEqualTo
public final boolean isLessOrEqualTo(int value) Description copied from class:AbstractCBLField
compare values of this field with the target field- Specified by:
isLessOrEqualTo
in interfaceISMNumeric
- Overrides:
isLessOrEqualTo
in classAbstractCBLField
- Parameters:
value
-- Returns:
-
isLessOrEqualTo
public final boolean isLessOrEqualTo(double value) Description copied from class:AbstractCBLField
compare values of this field with the target field- Specified by:
isLessOrEqualTo
in interfaceISMNumeric
- Overrides:
isLessOrEqualTo
in classAbstractCBLField
- Parameters:
value
-- Returns:
-
isLessOrEqualTo
public final boolean isLessOrEqualTo(long value) Description copied from class:AbstractCBLField
compare values of this field with the target field- Specified by:
isLessOrEqualTo
in interfaceISMNumeric
- Overrides:
isLessOrEqualTo
in classAbstractCBLField
- Parameters:
value
-- Returns:
-
isLessOrEqualTo
- Specified by:
isLessOrEqualTo
in interfaceISMNumeric
-
isLessOrEqualTo
Description copied from class:AbstractCBLField
compare values of this field with the target field- Specified by:
isLessOrEqualTo
in interfaceISMNumeric
- Overrides:
isLessOrEqualTo
in classAbstractCBLField
- Parameters:
value
-- Returns:
-
isLessOrEqualTo
Description copied from class:AbstractCBLField
compare values of this field with the target field- Specified by:
isLessOrEqualTo
in interfaceISMNumeric
- Overrides:
isLessOrEqualTo
in classAbstractCBLField
- Parameters:
value
-- Returns:
-
getStorageString
- Specified by:
getStorageString
in interfaceISMNumeric
-
createBlank
- Specified by:
createBlank
in classAbstractCBLField
-