
org.xcsp.common.structures.Transition Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xcsp3-tools Show documentation
Show all versions of xcsp3-tools Show documentation
Java Tools for parsing XCSP3 instances, compiling JvCSP3 models, and checking solutions. For more information about XCSP3, follow www.xcsp.org
The newest version!
package org.xcsp.common.structures;
/**
* This class allows us to represent a transition that is a useful object when defining finite automatons.
*/
public class Transition {
/**
* The source state, where the transition begins.
*/
public String start;
/**
* The value (object) labeling the transition.
*/
public Object value;
/**
* The target state, where the transition ends.
*/
public String end;
/**
* Constructs a transition from the specified arguments.
*
* @param firstState
* the first state, where the transition begins
* @param symbol
* the symbol labeling the transition
* @param secondState
* the second state, where the transition ends
*/
public Transition(String firstState, Object symbol, String secondState) {
this.start = firstState;
this.value = symbol;
this.end = secondState;
}
@Override
public String toString() {
return "(" + start + "," + value.toString() + "," + end + ")";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy