Record Class LogicalType.DecimalType
java.lang.Object
java.lang.Record
dev.hardwood.metadata.LogicalType.DecimalType
- All Implemented Interfaces:
LogicalType
- Enclosing interface:
LogicalType
public static record LogicalType.DecimalType(int scale, int precision)
extends Record
implements LogicalType
-
Nested Class Summary
Nested classes/interfaces inherited from interface LogicalType
LogicalType.BsonType, LogicalType.DateType, LogicalType.DecimalType, LogicalType.EnumType, LogicalType.IntervalType, LogicalType.IntType, LogicalType.JsonType, LogicalType.ListType, LogicalType.MapType, LogicalType.StringType, LogicalType.TimestampType, LogicalType.TimeType, LogicalType.TimeUnit, LogicalType.UuidType -
Constructor Summary
ConstructorsConstructorDescriptionDecimalType(int scale, int precision) Creates an instance of aDecimalTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theprecisionrecord component.intscale()Returns the value of thescalerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DecimalType
public DecimalType(int scale, int precision) Creates an instance of aDecimalTyperecord class.- Parameters:
scale- the value for thescalerecord componentprecision- the value for theprecisionrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
scale
public int scale()Returns the value of thescalerecord component.- Returns:
- the value of the
scalerecord component
-
precision
public int precision()Returns the value of theprecisionrecord component.- Returns:
- the value of the
precisionrecord component
-