|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.microfocus.cobol.lang.Comp3
Java class for COMP-3 datatype
Copyright: Copyright (c) 2002-2003
| Constructor Summary | |
Comp3(BigDecimal value,
int padSize)
Constructor for a signed comp-3 item with a defined picture size from a BigDecimal with a scale Example: |
|
Comp3(BigDecimal value,
int pictureSize,
boolean signed)
Constructor for a signed/unsigned comp-3 item with a defined picture size from a BigDecimal with a scale Example: |
|
Comp3(BigInteger value,
int pictureSize)
Constructor for a signed comp-3 item with a defined picture size |
|
Comp3(BigInteger value,
int pictureSize,
boolean signed)
Constructor for a signed/unsigned comp-3 item with a defined picture size Example: |
|
Comp3(String value,
int pictureSize)
Constructor for a signed comp-3 item with a defined picture size Example: |
|
Comp3(String value,
int pictureSize,
boolean signed)
Constructor for a signed/unsigned comp-3 item with a defined picture size Example: |
|
Comp3(String value,
int pictureSize,
int decimalPlaces)
Constructor for a signed comp-3 item with a defined picture size from a string with a picture size Example: |
|
| Method Summary | |
byte[] |
getBytes()
getBytes() public method to return bytes[] representation of a comp-3 field |
void |
synchronizeData()
synchronizeData() public method called by the COBOL Runtime to allow the comp-3 to update its Java represenation of the comp-3 field. |
String |
toDisplayFormat()
method to return the display format string of a Comp3 |
String |
toString()
toString() method to return a Comp3 as a String |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Comp3(BigInteger value,
int pictureSize)
value - BigInteger valuepictureSize - sizeof picture clause
The Java code that defines a : pic s9(8) comp-3 with a value of 12345678
comp31 = new Comp3(new BigInteger("12345678"), 8);
To display the field you can do:
System.out.println("comp31.toString() = " + comp31.toString());
public Comp3(BigDecimal value,
int padSize)
The Java code that defines a : pic s9(4)v9(4) comp-3 with a assumed
value of 1234.5678
BigDecimal scale4a = new BigDecimal(new BigInteger("12345678"), 4);
comp31 = new Comp3(scale4a, 8);
To display the field you can do:
System.out.println("scale4a.toString() = " + comp31.toString());
System.out.println("scale4a.toDisplayFormat() = " + comp31.toDisplayFormat());
value - padSize -
public Comp3(String value,
int pictureSize,
int decimalPlaces)
The Java code that defines a : pic s9(4)v9(5) comp-3 with a assumed
value of 1234.56789
comp31 = new Comp3("1234.56789",9,5);
To display the field you can do:
System.out.println("scale4a.toString() = " + comp31.toString());
System.out.println("scale4a.toDisplayFormat() = " + comp31.toDisplayFormat());
value - pictureSize - decimalPlaces -
public Comp3(String value,
int pictureSize)
The Java code that defines a : pic s9(8) comp-3 with a value of 12345678
comp31 = new Comp3("12345678", 8);
To display the field you can do:
System.out.println("comp31.toString() = " + comp31.toString());
value - pictureSize -
public Comp3(String value,
int pictureSize,
boolean signed)
The Java code that defines a : pic 9(8) comp-3 with a value of 12345678
comp31 = new Comp3("12345678", 8, false);
To display the field you can do:
System.out.println("comp31.toString() = " + comp31.toString());
value - pictureSize - signed -
public Comp3(BigInteger value,
int pictureSize,
boolean signed)
The Java code that defines a : pic s9(8) comp-3 with a value of 12345678
comp31 = new Comp3(new BigInteger("12345678"), 8, true);
To display the field you can do:
System.out.println("comp31.toString() = " + comp31.toString());
value - pictureSize - signed -
public Comp3(BigDecimal value,
int pictureSize,
boolean signed)
The Java code that defines a : pic s9(4)v9(4) comp-3 with a assumed
value of 1234.5678
BigDecimal scale4a = new BigDecimal(new BigInteger("12345678"), 4);
comp31 = new Comp3(scale4a, 8, true);
To display the field you can do:
System.out.println("scale4a.toString() = " + comp31.toString());
System.out.println("scale4a.toDisplayFormat() = " + comp31.toDisplayFormat());
value - pictureSize - signed - | Method Detail |
public byte[] getBytes()
getBytes in interface DataType
public void synchronizeData()
throws Exception
synchronizeData in interface DataTypeExceptionpublic String toDisplayFormat()
public String toString()
|
|||||||||||
| 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.