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(CATypeScalarIdentifier name, String description, String pattern)
extends Record
implements CATypeScalarType
A text type.
-
Nested Class Summary
Nested classes/interfaces inherited from interface CATypeScalarType
CATypeScalarType.Integral, CATypeScalarType.Kind, CATypeScalarType.Monetary, CATypeScalarType.Real, CATypeScalarType.Text, CATypeScalarType.Time -
Constructor Summary
ConstructorsConstructorDescriptionText(CATypeScalarIdentifier 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()name()Returns the value of thenamerecord component.pattern()Returns the value of thepatternrecord component.final StringtoString()Returns a string representation of this record class.withName(CATypeScalarIdentifier newName)
-
Constructor Details
-
Text
A text type.- Parameters:
name- The type namedescription- A humanly-readable description of the typepattern- The pattern that constrains text values
-
-
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
-
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 withObjects::equals(Object,Object). -
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
-