java.lang.Object
java.lang.Record
org.legstar.cobol.utils.PictureUtils.CompNumeric
- Record Components:
signed- is this a signed numerictotalDigits- total number of digits (including fraction digits)fractionDigits- number of fraction digits
- Enclosing class:
PictureUtils
public static record PictureUtils.CompNumeric(boolean signed, int totalDigits, int fractionDigits)
extends Record
A computational numeric properties
-
Constructor Summary
ConstructorsConstructorDescriptionCompNumeric(boolean signed, int totalDigits, int fractionDigits) Creates an instance of aCompNumericrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefractionDigitsrecord component.final inthashCode()Returns a hash code value for this object.booleansigned()Returns the value of thesignedrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalDigitsrecord component.
-
Constructor Details
-
CompNumeric
public CompNumeric(boolean signed, int totalDigits, int fractionDigits) Creates an instance of aCompNumericrecord class.- Parameters:
signed- the value for thesignedrecord componenttotalDigits- the value for thetotalDigitsrecord componentfractionDigits- the value for thefractionDigitsrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
signed
public boolean signed()Returns the value of thesignedrecord component.- Returns:
- the value of the
signedrecord component
-
totalDigits
public int totalDigits()Returns the value of thetotalDigitsrecord component.- Returns:
- the value of the
totalDigitsrecord component
-
fractionDigits
public int fractionDigits()Returns the value of thefractionDigitsrecord component.- Returns:
- the value of the
fractionDigitsrecord component
-