|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.microfocus.cobol.lang.internal.CobolBytes
com.microfocus.cobol.lang.internal.CobolField
com.microfocus.cobol.lang.internal.CobolNumeric
Field Summary |
Fields inherited from class com.microfocus.cobol.lang.internal.CobolField |
descriptor, F_BWZ, F_DBCS, F_EBCDIC, F_IBMCOMP, F_NONE, F_TRUNC, occurs, S_LEADING_INCLUDED, S_LEADING_SEPARATE, S_SIGNED_DEFAULT, S_TRAILING_INCLUDED, S_TRAILING_SEPARATE, S_UNSIGNED, T_ALPHANUMERIC, T_BCD, T_BINARY, T_DISPLAY, T_EDITED_ALPHANUMERIC, T_EDITED_DISPLAY, T_EDITED_FLOAT, T_FLOAT, T_PORTABLE_BINARY, T_UBCD |
Fields inherited from class com.microfocus.cobol.lang.internal.CobolBytes |
length, offset, record |
Constructor Summary | |
CobolNumeric(CobolRecord record,
int id,
int offset,
int length,
int type,
int flags,
int sign,
int digits,
int alignment)
Creates a new Cobol numeric data item. |
|
CobolNumeric(CobolRecord record,
int id,
int offset,
int length,
int occurs,
int type,
int flags,
int sign,
int digits,
int alignment)
Creates a new Cobol numeric data item. |
|
CobolNumeric(CobolRecord record,
int id,
int offset,
int length,
int occurs,
int flags,
String picture)
Creates a new Cobol numeric-edited data item. |
|
CobolNumeric(CobolRecord record,
int id,
int offset,
int length,
int flags,
String picture)
Creates a new Cobol numeric-edited data item. |
Method Summary | |
BigDecimal |
getBigDecimal()
Returns the value of this CobolNumeric as a BigDecimal |
BigInteger |
getBigInteger()
Returns the value of this CobolNumeric as a BigInteger |
byte |
getByteValue()
Returns the value of this CobolNumeric as a byte |
double |
getDoubleValue()
Returns the value of this CobolNumeric as a double |
float |
getFloatValue()
Returns the value of this CobolNumeric as a float |
int |
getIntValue()
Returns the value of this CobolNumeric as an int |
long |
getLongValue()
Returns the value of this CobolNumeric as a long |
short |
getShortValue()
Returns the value of this CobolNumeric as a short |
void |
setBigDecimal(BigDecimal value)
Set the CobolNumeric to the specified BigDecimal value |
void |
setBigInteger(BigInteger value)
Set the CobolNumeric to the specified BigInteger value |
void |
setByte(byte value)
Set the CobolNumeric to the specified byte value |
void |
setDouble(double value)
Set the CobolNumeric to the specified double value |
void |
setFloat(float value)
Set the CobolNumeric to the specified float value |
void |
setInt(int value)
Set the CobolNumeric to the specified int value |
void |
setLong(long value)
Set the CobolNumeric to the specified long value |
void |
setShort(short value)
Set the CobolNumeric to the specified short value |
void |
setString(String value)
Set the CobolNumeric to the specified String value |
String |
toString()
Convert the CobolNumeric to its String representation |
Methods inherited from class com.microfocus.cobol.lang.internal.CobolBytes |
getBytesValue, getRecord, setBytes |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CobolNumeric(CobolRecord record, int id, int offset, int length, int occurs, int type, int flags, int sign, int digits, int alignment)
record
- The record area containing the data itemid
- An identifier for the data item that is unique within the record. Zero if none specifiedoffset
- The offset of the data item within the record area. (0 = start)length
- The number of bytes in the data item. If the data item is an array then this is the number of
bytes in each element of the arrayoccurs
- The number of array entriestype
- The type of the numeric data item. Valid types are T_DISPLAY, T_BINARY, T_PORTABLE_BINARY, T_BCD,
T_UBCD, T_FLOATflags
- Additional type information. Valid flags are F_NONE, F_EBCDIC, F_TRUNC, F_IBMCOMPsign
- The type of sign associated with the data item. Valid signs are S_UNSIGNED, S_SIGNED_DEFAULT,
S_LEADING_INCLUDED, S_LEADING_SEPARATE, S_TRAILING_INCLUDED, S_TRAILING_SEPARATEdigits
- The number of digits in the data item. If the data item is defined in terms of bytes (T_BINARY
and T_PORTABLE_BINARY only), then this field should be zeroalignment
- The alignment of the decimal point within the digits. An alignment of zero indicates the
decimal point is at the rightmost end of the digits. A postive value indicates the number of positions
to the left of the rightmost end of the digits. A negative value indicates the number of additonal
positions to the right of the rightmost end of the digitsICobolType
public CobolNumeric(CobolRecord record, int id, int offset, int length, int type, int flags, int sign, int digits, int alignment)
record
- The record area containing the data itemid
- An identifier for the data item that is unique within the record. Zero if none specifiedoffset
- The offset of the data item within the record area. (0 = start)length
- The number of bytes in the data itemtype
- The type of the numeric data item. Valid types are T_DISPLAY, T_BINARY, T_PORTABLE_BINARY, T_BCD,
T_UBCD, T_FLOATflags
- Additional type information. Valid flags are F_NONE, F_EBCDIC, F_TRUNC, F_IBMCOMPsign
- The type of sign associated with the data item. Valid signs are S_UNSIGNED, S_SIGNED_DEFAULT,
S_LEADING_INCLUDED, S_LEADING_SEPARATE, S_TRAILING_INCLUDED, S_TRAILING_SEPARATEdigits
- The number of digits in the data item. If the data item is defined in terms of bytes (T_BINARY
and T_PORTABLE_BINARY only), then this field should be zeroalignment
- The alignment of the decimal point within the digits. An alignment of zero indicates the
decimal point is at the rightmost end of the digits. A postive value indicates the number of positions
to the left of the rightmost end of the digits. A negative value indicates the number of additonal
positions to the right of the rightmost end of the digitsICobolType
public CobolNumeric(CobolRecord record, int id, int offset, int length, int occurs, int flags, String picture)
record
- The record area containing the data itemid
- An identifier for the data item that is unique within the record. Zero if none specifiedoffset
- The offset of the data item within the record area. (0 = start)length
- The number of bytes in the data itemoccurs
- The number of array entriesflags
- Additional type information. Valid flags are F_NONE, F_EBCDIC, F_TRUNC, F_IBMCOMPpicture
- The Cobol picture clause of the numeric edited data itemICobolType
public CobolNumeric(CobolRecord record, int id, int offset, int length, int flags, String picture)
record
- The record area containing the data itemid
- An identifier for the data item that is unique within the record. Zero if none specifiedoffset
- The offset of the data item within the record area. (0 = start)length
- The number of bytes in the data item.flags
- Additional type information. Valid flags are F_NONE, F_EBCDIC, F_TRUNC, F_IBMCOMPpicture
- The Cobol picture clause of the numeric edited data itemICobolType
Method Detail |
public BigDecimal getBigDecimal() throws CobolRecordException
CobolRecordException
- If an error occurspublic BigInteger getBigInteger() throws CobolRecordException
CobolRecordException
- If an error occurspublic byte getByteValue() throws CobolRecordException
CobolRecordException
- If an error occurspublic short getShortValue() throws CobolRecordException
CobolRecordException
- If an error occurspublic int getIntValue() throws CobolRecordException
CobolRecordException
- If an error occurspublic long getLongValue() throws CobolRecordException
CobolRecordException
- If an error occurspublic float getFloatValue() throws CobolRecordException
CobolRecordException
- If an error occurspublic double getDoubleValue() throws CobolRecordException
CobolRecordException
- If an error occurspublic void setBigDecimal(BigDecimal value) throws CobolRecordException
value
- the BigDecimal to be assigned to this CobolNumeric
CobolRecordException
- If an error occurspublic void setBigInteger(BigInteger value) throws CobolRecordException
value
- the BigInteger to be assigned to this CobolNumeric
CobolRecordException
- If an error occurspublic void setByte(byte value) throws CobolRecordException
value
- the byte to be assigned to this CobolNumeric
CobolRecordException
- If an error occurspublic void setShort(short value) throws CobolRecordException
value
- the short to be assigned to this CobolNumeric
CobolRecordException
- If an error occurspublic void setInt(int value) throws CobolRecordException
value
- the int to be assigned to this CobolNumeric
CobolRecordException
- If an error occurspublic void setLong(long value) throws CobolRecordException
value
- the long to be assigned to this CobolNumeric
CobolRecordException
- If an error occurspublic void setFloat(float value) throws CobolRecordException
value
- the float to be assigned to this CobolNumeric
CobolRecordException
- If an error occurspublic void setDouble(double value) throws CobolRecordException
value
- the double to be assigned to this CobolNumeric
CobolRecordException
- If an error occurspublic void setString(String value) throws CobolRecordException
setString
in class CobolField
value
- the String to be assigned to this CobolNumeric
CobolRecordException
- If an error occurspublic String toString()
toString
in class CobolField
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2000 Micro Focus International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.