/* * Filename: State.java * * Author: Raf Van de Plas * * Contact: * Snail-mail: K.U.Leuven * ESAT-SCD * Kasteelpark Arenberg 10 * B-3001 Leuven-Heverlee * Belgium * Tel: +32 16 327927 * Fax: +32 16 321970 * Gsm: +32 474 243046 * E-mail: raf.vandeplas@esat.kuleuven.ac.be * WWW: http://www.esat.kuleuven.ac.be/~dna/BioI/ * * * Created on: Dec 3, 2003 * * Changed on: Dec 3, 2003 * * Version: 0.1 * * Description: * none * */ /** * @author rvdplas * * To change the template for this generated type comment go to * Window - Preferences - Java - Code Generation - Code and Comments */ public class State { private boolean startState = false; private boolean endState = false; private int uniqueId; private String name = null; private StateCompanion stateComp = null; public State(int uniqueId, String name, StateCompanion stateComp) { this.uniqueId = uniqueId; this.name = name; this.stateComp = stateComp; } public boolean isStartState() { return this.startState; } public void setStartFlag(boolean startFlag) { this.startState = startFlag; } public boolean isEndState() { return this.endState; } public void setEndFlag(boolean endFlag) { this.endState = endFlag; } public int getId() { return this.uniqueId; } public String getName() { return this.name; } //The state message indicates fulfillment public String getStateMessage() { return this.stateComp.getStateMessage(); } public StateCompanion getStateCompanion() { return this.stateComp; } public boolean equals(State otherState) { return (this.getId() == otherState.getId()); } }