Record Class Transition
java.lang.Object
java.lang.Record
it.tugamer89.autogex.core.Transition
- Record Components:
from- The starting state of the transition.symbol- The symbol read during the transition (null indicates an epsilon transition).to- The destination state.
-
Constructor Summary
ConstructorsConstructorDescriptionTransition(State from, Character symbol, State 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.final inthashCode()Returns a hash code value for this object.booleanChecks if this is a silent transition.symbol()Returns the value of thesymbolrecord component.to()Returns the value of thetorecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
Transition
-
-
Method Details
-
isEpsilon
public boolean isEpsilon()Checks if this is a silent transition. We use 'null' to represent epsilon (ε).- Returns:
- true if it is an epsilon transition, false otherwise.
-
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). -
from
-
symbol
-
to
-