java.lang.Object
java.lang.Record
org.aya.core.repr.PatShape.ShapedCtor
- Record Components:
dataId- a reference to aCodeShape.DataShaped termctorId- theCodeShape.GlobalIdto the ctor
- All Implemented Interfaces:
PatShape,PatShape.CtorLike
- Enclosing interface:
PatShape
public static record PatShape.ShapedCtor(CodeShape.MomentId dataId, CodeShape.GlobalId ctorId, @NotNull kala.collection.immutable.ImmutableSeq<PatShape> innerPats)
extends Record
implements PatShape.CtorLike
Expecting a certain ctor,
ShapeMatcher will crash
if the is invalid (such as undefined or not a DataShaped thing)-
Nested Class Summary
Nested classes/interfaces inherited from interface org.aya.core.repr.PatShape
PatShape.Any, PatShape.Bind, PatShape.Ctor, PatShape.CtorLike, PatShape.ShapedCtor -
Constructor Summary
ConstructorsConstructorDescriptionShapedCtor(CodeShape.MomentId dataId, CodeShape.GlobalId ctorId, @NotNull kala.collection.immutable.ImmutableSeq<PatShape> innerPats) Creates an instance of aShapedCtorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionctorId()Returns the value of thectorIdrecord component.dataId()Returns the value of thedataIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull kala.collection.immutable.ImmutableSeq<PatShape>Returns the value of theinnerPatsrecord component.static @NotNull PatShape.ShapedCtorof(CodeShape.MomentId name, CodeShape.GlobalId id) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ShapedCtor
public ShapedCtor(@NotNull CodeShape.MomentId dataId, @NotNull CodeShape.GlobalId ctorId, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<PatShape> innerPats) Creates an instance of aShapedCtorrecord class.
-
-
Method Details
-
of
@NotNull public static @NotNull PatShape.ShapedCtor of(@NotNull CodeShape.MomentId name, @NotNull CodeShape.GlobalId id) -
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). -
dataId
Returns the value of thedataIdrecord component.- Returns:
- the value of the
dataIdrecord component
-
ctorId
Returns the value of thectorIdrecord component.- Returns:
- the value of the
ctorIdrecord component
-
innerPats
Returns the value of theinnerPatsrecord component.- Specified by:
innerPatsin interfacePatShape.CtorLike- Returns:
- the value of the
innerPatsrecord component
-