Record Class Ir.Transition
java.lang.Object
java.lang.Record
org.clafer.frontend.Ir.Transition
- Enclosing class:
Ir
public static record Ir.Transition(SourceSpan span, boolean sync, Ir.Exp from, Optional<Ir.Exp> guard, Ir.Exp to)
extends Record
implements Ir.Exp
A transition, rich:
a --> b, a -[g]-> b,
a -->> b or a -[g]->> b, whose target may be a chain
of transitions.-
Constructor Summary
ConstructorsConstructorDescriptionTransition(SourceSpan span, boolean sync, Ir.Exp from, Optional<Ir.Exp> guard, Ir.Exp to) Creates an instance of aTransitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.from()Returns the value of thefromrecord component.guard()Returns the value of theguardrecord component.final inthashCode()Returns a hash code value for this object.booleanisRich()span()Returns the value of thespanrecord component.booleansync()Returns the value of thesyncrecord component.to()Returns the value of thetorecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Transition
Creates an instance of aTransitionrecord class.- Parameters:
span- the value for thespanrecord componentsync- the value for thesyncrecord componentfrom- the value for thefromrecord componentguard- the value for theguardrecord componentto- the value for thetorecord component
-
-
Method Details
-
isRich
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
span
Returns the value of thespanrecord component. -
sync
Returns the value of thesyncrecord component.- Returns:
- the value of the
syncrecord component
-
from
-
guard
-
to
-