Package com.io7m.cardant.model
Record Class CATypeScalarType.Text
java.lang.Object
java.lang.Record
com.io7m.cardant.model.CATypeScalarType.Text
- Record Components:
name- The type namedescription- A humanly-readable description of the typepattern- The pattern that constrains text values
- All Implemented Interfaces:
CATypeScalarType
- Enclosing interface:
CATypeScalarType
public static record CATypeScalarType.Text(com.io7m.lanark.core.RDottedName name, String description, String pattern)
extends Record
implements CATypeScalarType
A text type.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.io7m.cardant.model.CATypeScalarType
CATypeScalarType.Integral, CATypeScalarType.Kind, CATypeScalarType.Monetary, CATypeScalarType.Real, CATypeScalarType.Text, CATypeScalarType.Time -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleankind()com.io7m.lanark.core.RDottedNamename()Returns the value of thenamerecord component.pattern()Returns the value of thepatternrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Text
A text type.
-
-
Method Details
-
kind
- Specified by:
kindin interfaceCATypeScalarType- Returns:
- The internal type kind
-
showConstraint
- Specified by:
showConstraintin interfaceCATypeScalarType- Returns:
- A humanly-readable description of this type's value constraints
-
isValid
- Parameters:
value- The value- Returns:
trueif the given value is in the range for this type
-
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 withObjects::equals(Object,Object). -
name
public com.io7m.lanark.core.RDottedName name()Returns the value of thenamerecord component.- Specified by:
namein interfaceCATypeScalarType- Returns:
- the value of the
namerecord component
-
description
Returns the value of thedescriptionrecord component.- Specified by:
descriptionin interfaceCATypeScalarType- Returns:
- the value of the
descriptionrecord component
-
pattern
Returns the value of thepatternrecord component.- Returns:
- the value of the
patternrecord component
-