Record Class ScmList
java.lang.Object
java.lang.Record
org.impulsegraph.compiler.ast.ScmList
- All Implemented Interfaces:
ImpScmNode
Generic homoiconic S-expression list (e.g. (+ 2 (* 3 4)) or (vec-cmp-gt a
10)).
-
Constructor Summary
ConstructorsConstructorDescriptionScmList(List<ImpScmNode> elements) Creates an instance of aScmListrecord class. -
Method Summary
Modifier and TypeMethodDescription<R> Raccept(ImpScmVisitor<R> visitor) elements()Returns the value of theelementsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static ScmListof(ImpScmNode... elements) static ScmListofList(List<? extends ImpScmNode> elements) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ScmList
Creates an instance of aScmListrecord class.- Parameters:
elements- the value for theelementsrecord component
-
-
Method Details
-
of
-
ofList
-
toScmString
- Specified by:
toScmStringin interfaceImpScmNode
-
accept
- Specified by:
acceptin interfaceImpScmNode
-
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). -
elements
Returns the value of theelementsrecord component.- Returns:
- the value of the
elementsrecord component
-