Package de.firemage.autograder.treeg.ast
Record Class Quantifier
java.lang.Object
java.lang.Record
de.firemage.autograder.treeg.ast.Quantifier
- All Implemented Interfaces:
RegExNode
public record Quantifier(RegExNode child, Quantifier.Type type, int min, int max)
extends Record
implements RegExNode
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionQuantifier(RegExNode child, Quantifier.Type type, int min, int max) Creates an instance of aQuantifierrecord class. -
Method Summary
Modifier and TypeMethodDescriptionchild()Returns the value of thechildrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intmax()Returns the value of themaxrecord component.intmin()Returns the value of theminrecord component.toRegEx()final StringtoString()Returns a string representation of this record class.voidtoTree(TreePrinter printer) type()Returns the value of thetyperecord component.
-
Constructor Details
-
Quantifier
Creates an instance of aQuantifierrecord class.- Parameters:
child- the value for thechildrecord componenttype- the value for thetyperecord componentmin- the value for theminrecord componentmax- the value for themaxrecord component
-
-
Method Details
-
toRegEx
-
toTree
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
child
Returns the value of thechildrecord component.- Returns:
- the value of the
childrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
min
public int min()Returns the value of theminrecord component.- Returns:
- the value of the
minrecord component
-
max
public int max()Returns the value of themaxrecord component.- Returns:
- the value of the
maxrecord component
-