Package fluent.syntax.AST
Record Class Term
java.lang.Object
java.lang.Record
fluent.syntax.AST.Term
- All Implemented Interfaces:
Entry
,Identifiable
,SyntaxNode
public record Term(@NotNull Identifier identifier, @NotNull Pattern value, @NotNull List<Attribute> attributes, Commentary.Comment _comment)
extends Record
implements Entry, Identifiable
-
Constructor Summary
ConstructorsConstructorDescriptionTerm(@NotNull Identifier id, @NotNull Pattern value, @NotNull List<Attribute> attributes)
Term(@NotNull Identifier identifier, @NotNull Pattern value, @NotNull List<Attribute> attributes, Commentary.Comment _comment)
Creates an instance of aTerm
record class. -
Method Summary
Modifier and TypeMethodDescription_comment()
Returns the value of the_comment
record component.attribute(Identifier id)
Find attribute matching IdentifierFind attribute matching StringReturns the value of theattributes
record component.comment()
The (optional) Commentboolean
Indicates whether some other object is "equal to" this one.int
hashCode()
Returns a hash code value for this object.@NotNull Identifier
Returns the value of theidentifier
record component.toString()
Returns a string representation of this record class.@NotNull Pattern
value()
Returns the value of thevalue
record component.withComment(Commentary.Comment newComment)
Create a new Term, replacing the existing Comment, if any.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface fluent.syntax.AST.Identifiable
name
-
Constructor Details
-
Term
public Term(@NotNull @NotNull Identifier identifier, @NotNull @NotNull Pattern value, @NotNull @NotNull List<Attribute> attributes, @Nullable Commentary.Comment _comment)Creates an instance of aTerm
record class.- Parameters:
identifier
- the value for theidentifier
record componentvalue
- the value for thevalue
record componentattributes
- the value for theattributes
record component_comment
- the value for the_comment
record component
-
Term
public Term(@NotNull @NotNull Identifier id, @NotNull @NotNull Pattern value, @NotNull @NotNull List<Attribute> attributes)
-
-
Method Details
-
withComment
Create a new Term, replacing the existing Comment, if any. -
attribute
Find attribute matching Identifier -
attribute
Find attribute matching String -
comment
The (optional) Comment -
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)
. -
identifier
Returns the value of theidentifier
record component.- Specified by:
identifier
in interfaceIdentifiable
- Returns:
- the value of the
identifier
record component
-
value
Returns the value of thevalue
record component.- Returns:
- the value of the
value
record component
-
attributes
Returns the value of theattributes
record component.- Returns:
- the value of the
attributes
record component
-
_comment
Returns the value of the_comment
record component.- Returns:
- the value of the
_comment
record component
-