Package openGql.grammar
Class PrecisionAndScale
- java.lang.Object
-
- openGql.grammar.PrecisionAndScale
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<PrecisionAndScale>
public class PrecisionAndScale extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<PrecisionAndScale>
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static NameNOT_NULLName of theopenGql.grammar.PrecisionAndScale.notNullfield.java.lang.BooleannotNulljava.lang.Stringprecisionstatic NamePRECISIONName of theopenGql.grammar.PrecisionAndScale.precisionfield.Optional<java.lang.String>scalestatic NameSCALEName of theopenGql.grammar.PrecisionAndScale.scalefield.static NameTYPE_Name of theopenGql.grammar.PrecisionAndScaletype.
-
Constructor Summary
Constructors Constructor Description PrecisionAndScale(java.lang.String precision, Optional<java.lang.String> scale, java.lang.Boolean notNull)Constructs an immutablePrecisionAndScale.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(PrecisionAndScale other)booleanequals(java.lang.Object other)inthashCode()PrecisionAndScalewithNotNull(java.lang.Boolean notNull)Returns a copy of thisPrecisionAndScalewithnotNullreplaced.PrecisionAndScalewithPrecision(java.lang.String precision)Returns a copy of thisPrecisionAndScalewithprecisionreplaced.PrecisionAndScalewithScale(Optional<java.lang.String> scale)Returns a copy of thisPrecisionAndScalewithscalereplaced.
-
-
-
Field Detail
-
TYPE_
public static final Name TYPE_
Name of theopenGql.grammar.PrecisionAndScaletype.
-
PRECISION
public static final Name PRECISION
Name of theopenGql.grammar.PrecisionAndScale.precisionfield.
-
SCALE
public static final Name SCALE
Name of theopenGql.grammar.PrecisionAndScale.scalefield.
-
NOT_NULL
public static final Name NOT_NULL
Name of theopenGql.grammar.PrecisionAndScale.notNullfield.
-
precision
public final java.lang.String precision
-
scale
public final Optional<java.lang.String> scale
-
notNull
public final java.lang.Boolean notNull
-
-
Constructor Detail
-
PrecisionAndScale
public PrecisionAndScale(java.lang.String precision, Optional<java.lang.String> scale, java.lang.Boolean notNull)Constructs an immutablePrecisionAndScale.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
compareTo
public int compareTo(PrecisionAndScale other)
- Specified by:
compareToin interfacejava.lang.Comparable<PrecisionAndScale>
-
withPrecision
public PrecisionAndScale withPrecision(java.lang.String precision)
Returns a copy of thisPrecisionAndScalewithprecisionreplaced.
-
withScale
public PrecisionAndScale withScale(Optional<java.lang.String> scale)
Returns a copy of thisPrecisionAndScalewithscalereplaced.
-
withNotNull
public PrecisionAndScale withNotNull(java.lang.Boolean notNull)
Returns a copy of thisPrecisionAndScalewithnotNullreplaced.
-
-