java.lang.Object
java.lang.Record
org.aya.core.term.MatchTerm
public record MatchTerm(@NotNull kala.collection.immutable.ImmutableSeq<Term> discriminant, @NotNull kala.collection.immutable.ImmutableSeq<Term.Matching> clauses)
extends Record
implements Term
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.aya.guest0x0.cubical.Restr.TermLike
org.aya.guest0x0.cubical.Restr.TermLike.Factory<T>Nested classes/interfaces inherited from interface org.aya.core.term.Term
Term.Matching, Term.Param -
Constructor Summary
ConstructorsConstructorDescriptionMatchTerm(@NotNull kala.collection.immutable.ImmutableSeq<Term> discriminant, @NotNull kala.collection.immutable.ImmutableSeq<Term.Matching> clauses) Creates an instance of aMatchTermrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull kala.collection.immutable.ImmutableSeq<Term.Matching>clauses()Returns the value of theclausesrecord component.@NotNull kala.collection.immutable.ImmutableSeq<Term>Returns the value of thediscriminantrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.@NotNull kala.control.Option<Term>tryMatch()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.aya.generic.AyaDocile
debuggerOnlyToDocMethods inherited from interface org.aya.guest0x0.cubical.Restr.TermLike
asFormulaMethods inherited from interface org.aya.core.term.Term
computeSort, computeType, descent, findUsages, freezeHoles, lift, normalize, rename, scopeCheck, subst, subst, subst, subst, toDoc
-
Constructor Details
-
MatchTerm
public MatchTerm(@NotNull @NotNull kala.collection.immutable.ImmutableSeq<Term> discriminant, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<Term.Matching> clauses) Creates an instance of aMatchTermrecord class.- Parameters:
discriminant- the value for thediscriminantrecord componentclauses- the value for theclausesrecord component
-
-
Method Details
-
tryMatch
-
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). -
discriminant
Returns the value of thediscriminantrecord component.- Returns:
- the value of the
discriminantrecord component
-
clauses
Returns the value of theclausesrecord component.- Returns:
- the value of the
clausesrecord component
-