Record Class CASyntaxRuleLeaf
java.lang.Object
java.lang.Record
com.io7m.cardant.parsers.CASyntaxRuleLeaf
- Record Components:
name- The nametext- The rule textexamples- The examples
- All Implemented Interfaces:
CASyntaxRuleType, Comparable<CASyntaxRuleType>
-
Constructor Summary
ConstructorsConstructorDescriptionCASyntaxRuleLeaf(String name, String text, List<String> examples) A syntax rule leaf. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(CASyntaxRuleType other) final booleanIndicates whether some other object is "equal to" this one.examples()Returns the value of theexamplesrecord component.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.subRules()text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CASyntaxRuleLeaf
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<CASyntaxRuleType>
-
subRules
- Specified by:
subRulesin interfaceCASyntaxRuleType- Returns:
- The syntax rules
-
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 interfaceCASyntaxRuleType- Returns:
- the value of the
namerecord component
-
text
Returns the value of thetextrecord component.- Specified by:
textin interfaceCASyntaxRuleType- Returns:
- the value of the
textrecord component
-
examples
-