org.waxeye.parser.Edge Maven / Gradle / Ivy
The newest version!
/*
* Waxeye Parser Generator
* www.waxeye.org
* Copyright (C) 2008-2010 Orlando Hill
* Licensed under the MIT license. See 'LICENSE' for details.
*/
package org.waxeye.parser;
/**
* An edge in an automaton state.
*
* @param The node types for the AST.
*
* @author Orlando Hill
*/
public final class Edge >
{
/** The transition cost. */
private final ITransition trans;
/** The state to transition to. */
private final int state;
/** Whether the edge is voided. */
private final boolean voided;
/**
* Creates a new Edge.
*
* @param trans The transition cost.
*
* @param state The state to transition to.
*
* @param voided Whether the edge is voided.
*/
public Edge(final ITransition trans, final int state, final boolean voided)
{
this.trans = trans;
this.state = state;
this.voided = voided;
}
/**
* Returns the trans.
*
* @return Returns the trans.
*/
public ITransition getTrans()
{
return trans;
}
/**
* Returns the state.
*
* @return Returns the state.
*/
public int getState()
{
return state;
}
/**
* Returns the voided.
*
* @return Returns the voided.
*/
public boolean isVoided()
{
return voided;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy