Package com.io7m.cardant.model
Record Class CATypeScalarType.Text
java.lang.Object
java.lang.Record
com.io7m.cardant.model.CATypeScalarType.Text
- Record Components:
packageIdentifier- The package to which this type belongsname- 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(CATypePackageIdentifier packageIdentifier, 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
ConstructorsConstructorDescriptionText(CATypePackageIdentifier packageIdentifier, com.io7m.lanark.core.RDottedName name, String description, String pattern) A text type. -
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.Returns the value of thepackageIdentifierrecord component.pattern()Returns the value of thepatternrecord component.final StringtoString()Returns a string representation of this record class.withName(com.io7m.lanark.core.RDottedName newName)
-
Constructor Details
-
Text
public Text(CATypePackageIdentifier packageIdentifier, com.io7m.lanark.core.RDottedName name, String description, String pattern) A text type.
-
-
Method Details
-
kind
- Specified by:
kindin interfaceCATypeScalarType- Returns:
- The internal type kind
-
withName
- Specified by:
withNamein interfaceCATypeScalarType- Parameters:
newName- The new name- Returns:
- This type with a new name
-
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). -
packageIdentifier
Returns the value of thepackageIdentifierrecord component.- Specified by:
packageIdentifierin interfaceCATypeScalarType- Returns:
- the value of the
packageIdentifierrecord component
-
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
-