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, wrapperOffsetCountFields 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
ConstructorsModifierConstructorDescriptionprotectedAbstractCBLNumeric(AbstractCBLNumeric parent, int[] index) protectedAbstractCBLNumeric(AbstractCBLPrimitive parent, int[] index) AbstractCBLNumeric(String name, int[] theDim, String picture, CBLBean wrapper, int compMode) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidassignValue(AbstractCBLField field) Set value of the objectfinal voidassignValue(AbstractCBLField field, int[] indexes) Method Used internally by framework Set value of the objectfinal BigDecimalfinal BigIntegerfinal intcompareTo(BigDecimal value) final doublefinal booleanequals(double value) if field1 == field2final booleanequals(int value) if field1 == field2final booleanequals(long value) if field1 == field2booleancheck against 88-RangeItemsfinal booleanif field1 == field2final booleanequals(BigDecimal value) final double[]SAS 11.03.2009 returns table as an array of valuesfinal intfinal Numberfinal Objectfinal Objectfinal intgetValue()Deprecated.- use retrieveAsIntfinal intintValue()final intintValue(int[] indexes) final booleanIs object filled with 'filler'final booleanisGreaterOrEqualTo(double value) compare values of this field with the target fieldfinal booleanisGreaterOrEqualTo(int value) compare values of this field with the target fieldfinal booleanisGreaterOrEqualTo(long value) compare values of this field with the target fieldfinal booleanisGreaterOrEqualTo(ISMNumeric value) final booleanisGreaterOrEqualTo(String value) compare values of this field with the target fieldfinal booleanisGreaterOrEqualTo(BigDecimal value) compare values of this field with the target fieldfinal booleanisGreaterThan(double value) compare values of this field with the target fieldfinal booleanisGreaterThan(int value) compare values of this field with the target fieldfinal booleanisGreaterThan(long value) compare values of this field with the target fieldfinal booleanisGreaterThan(ISMNumeric value) final booleanisGreaterThan(String value) compare values of this field with the target fieldfinal booleanisGreaterThan(BigDecimal value) compare values of this field with the target fieldfinal booleanisLessOrEqualTo(double value) compare values of this field with the target fieldfinal booleanisLessOrEqualTo(int value) compare values of this field with the target fieldfinal booleanisLessOrEqualTo(long value) compare values of this field with the target fieldfinal booleanisLessOrEqualTo(ISMNumeric value) final booleanisLessOrEqualTo(String value) compare values of this field with the target fieldfinal booleanisLessOrEqualTo(BigDecimal value) compare values of this field with the target fieldfinal booleanisLessThan(double value) compare values of this field with the target fieldfinal booleanisLessThan(int value) compare values of this field with the target fieldfinal booleanisLessThan(long value) compare values of this field with the target fieldfinal booleanisLessThan(ISMNumeric value) final booleanisLessThan(String value) compare values of this field with the target fieldfinal booleanisLessThan(BigDecimal value) compare values of this field with the target fieldfinal longfinal longlongValue(int[] indexes) final BigDecimalfinal BigDecimalretrieveAsBigDecimal(int index) final BigDecimalretrieveAsBigDecimal(int[] indexes) final BigIntegerfinal doublefinal doubleretrieveAsDouble(int index) final doubleretrieveAsDouble(int[] indexes) final intfinal intretrieveAsInt(int arrayElement) Arrayed Accessor - for single dimenSion arrays.final intretrieveAsInt(int[] indexes) final intretrieveAsInt(int arrayElement1, int arrayElement2) Arrayed Accessor - for two dimenSion arraysfinal longfinal longretrieveAsLong(int index) final longretrieveAsLong(int[] indexes) final voidsetRound(double doubleVal) Support for COBOL's ROUNDED statement.final voidsetRound(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, setObjectAsStringMethods 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, retrieveStorageBytes, retrieveStorageBytes, retrieveStorageCellSize, retrieveSubField, retrieveSubstring, retrieveSubstring, retrieveWrapper, setBlankWhenZero, setCachedValue, setHighValues, setHighValues, setLowValues, setLowValues, setNumberOfSQLColumns, setNumOccurs, setOmitted, setParentGroup, setSeparateColumn, setSeparateTable, setSubstring, setSubstring, setSubstring, setSubstring, setWrapper, stringValue, toEbcdic, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.softwaremining.wrappers.ISMDataType
stringValueMethods inherited from interface com.softwaremining.wrappers.ISMNumeric
assignValue, getFormat, lengthOfMethods inherited from interface com.softwaremining.wrappers.ISMObject
assignExcludeFromSQLTable, assignMasterSQLColumnsForArrays, assignObject, assignString, assignStringFormatted, assignSubstring, assignValue, bytesSize, fill, initialize, isExcludedFromSQLTable, isFiller, retrieveAsString, retrieveAsStringFormatted, retrieveMasterSQLColumnsForArrays, retrieveName, retrieveObject, retrieveSQLObject, retrieveSQLObject, 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:
setRoundin 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:
doubleValuein interfaceISMNumeric
-
retrieveAsDouble
public final double retrieveAsDouble()- Specified by:
retrieveAsDoublein 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:AbstractCBLFieldSet value of the object- Overrides:
assignValuein classAbstractCBLField
-
assignValue
Description copied from class:AbstractCBLFieldMethod Used internally by framework Set value of the object- Overrides:
assignValuein classAbstractCBLField
-
getObject
-
getObjectNoLeftCut
-
isFilled
Description copied from class:AbstractCBLFieldIs object filled with 'filler'- Overrides:
isFilledin classAbstractCBLField
-
getNumber
- Specified by:
getNumberin interfaceISMNumeric
-
equals
public final boolean equals(int value) Description copied from class:AbstractCBLFieldif field1 == field2- Overrides:
equalsin classAbstractCBLField- Returns:
-
equals
public final boolean equals(double value) Description copied from class:AbstractCBLFieldif field1 == field2- Overrides:
equalsin classAbstractCBLField- Returns:
-
equals
public final boolean equals(long value) Description copied from class:AbstractCBLFieldif field1 == field2- Overrides:
equalsin classAbstractCBLField- Returns:
-
equals
Description copied from class:AbstractCBLFieldif field1 == field2- Overrides:
equalsin classAbstractCBLField- Returns:
-
equals
check against 88-RangeItems- Overrides:
equalsin classAbstractCBLField
-
equals
-
isGreaterThan
public final boolean isGreaterThan(double value) Description copied from class:AbstractCBLFieldcompare values of this field with the target field- Specified by:
isGreaterThanin interfaceISMNumeric- Overrides:
isGreaterThanin classAbstractCBLField
-
isGreaterThan
public final boolean isGreaterThan(int value) Description copied from class:AbstractCBLFieldcompare values of this field with the target field- Specified by:
isGreaterThanin interfaceISMNumeric- Overrides:
isGreaterThanin classAbstractCBLField
-
isGreaterThan
public final boolean isGreaterThan(long value) Description copied from class:AbstractCBLFieldcompare values of this field with the target field- Specified by:
isGreaterThanin interfaceISMNumeric- Overrides:
isGreaterThanin classAbstractCBLField
-
isGreaterThan
- Specified by:
isGreaterThanin interfaceISMNumeric
-
isGreaterThan
Description copied from class:AbstractCBLFieldcompare values of this field with the target field- Specified by:
isGreaterThanin interfaceISMNumeric- Overrides:
isGreaterThanin classAbstractCBLField
-
isGreaterThan
Description copied from class:AbstractCBLFieldcompare values of this field with the target field- Specified by:
isGreaterThanin interfaceISMNumeric- Overrides:
isGreaterThanin classAbstractCBLField
-
isGreaterOrEqualTo
public final boolean isGreaterOrEqualTo(int value) Description copied from class:AbstractCBLFieldcompare values of this field with the target field- Specified by:
isGreaterOrEqualToin interfaceISMNumeric- Overrides:
isGreaterOrEqualToin classAbstractCBLField
-
isGreaterOrEqualTo
public final boolean isGreaterOrEqualTo(double value) Description copied from class:AbstractCBLFieldcompare values of this field with the target field- Specified by:
isGreaterOrEqualToin interfaceISMNumeric- Overrides:
isGreaterOrEqualToin classAbstractCBLField
-
isGreaterOrEqualTo
public final boolean isGreaterOrEqualTo(long value) Description copied from class:AbstractCBLFieldcompare values of this field with the target field- Specified by:
isGreaterOrEqualToin interfaceISMNumeric- Overrides:
isGreaterOrEqualToin classAbstractCBLField
-
isGreaterOrEqualTo
- Specified by:
isGreaterOrEqualToin interfaceISMNumeric
-
isGreaterOrEqualTo
Description copied from class:AbstractCBLFieldcompare values of this field with the target field- Specified by:
isGreaterOrEqualToin interfaceISMNumeric- Overrides:
isGreaterOrEqualToin classAbstractCBLField
-
isGreaterOrEqualTo
Description copied from class:AbstractCBLFieldcompare values of this field with the target field- Specified by:
isGreaterOrEqualToin interfaceISMNumeric- Overrides:
isGreaterOrEqualToin classAbstractCBLField
-
compareTo
-
isLessThan
public final boolean isLessThan(int value) Description copied from class:AbstractCBLFieldcompare values of this field with the target field- Overrides:
isLessThanin classAbstractCBLField- Returns:
-
isLessThan
public final boolean isLessThan(double value) Description copied from class:AbstractCBLFieldcompare values of this field with the target field- Specified by:
isLessThanin interfaceISMNumeric- Overrides:
isLessThanin classAbstractCBLField
-
isLessThan
public final boolean isLessThan(long value) Description copied from class:AbstractCBLFieldcompare values of this field with the target field- Specified by:
isLessThanin interfaceISMNumeric- Overrides:
isLessThanin classAbstractCBLField
-
isLessThan
- Specified by:
isLessThanin interfaceISMNumeric
-
isLessThan
Description copied from class:AbstractCBLFieldcompare values of this field with the target field- Specified by:
isLessThanin interfaceISMNumeric- Overrides:
isLessThanin classAbstractCBLField
-
isLessThan
Description copied from class:AbstractCBLFieldcompare values of this field with the target field- Specified by:
isLessThanin interfaceISMNumeric- Overrides:
isLessThanin classAbstractCBLField
-
isLessOrEqualTo
public final boolean isLessOrEqualTo(int value) Description copied from class:AbstractCBLFieldcompare values of this field with the target field- Specified by:
isLessOrEqualToin interfaceISMNumeric- Overrides:
isLessOrEqualToin classAbstractCBLField
-
isLessOrEqualTo
public final boolean isLessOrEqualTo(double value) Description copied from class:AbstractCBLFieldcompare values of this field with the target field- Specified by:
isLessOrEqualToin interfaceISMNumeric- Overrides:
isLessOrEqualToin classAbstractCBLField
-
isLessOrEqualTo
public final boolean isLessOrEqualTo(long value) Description copied from class:AbstractCBLFieldcompare values of this field with the target field- Specified by:
isLessOrEqualToin interfaceISMNumeric- Overrides:
isLessOrEqualToin classAbstractCBLField
-
isLessOrEqualTo
- Specified by:
isLessOrEqualToin interfaceISMNumeric
-
isLessOrEqualTo
Description copied from class:AbstractCBLFieldcompare values of this field with the target field- Specified by:
isLessOrEqualToin interfaceISMNumeric- Overrides:
isLessOrEqualToin classAbstractCBLField
-
isLessOrEqualTo
Description copied from class:AbstractCBLFieldcompare values of this field with the target field- Specified by:
isLessOrEqualToin interfaceISMNumeric- Overrides:
isLessOrEqualToin classAbstractCBLField
-
getStorageString
- Specified by:
getStorageStringin interfaceISMNumeric
-
createBlank
- Specified by:
createBlankin classAbstractCBLField
-