JFlex

Class Action

public final class Action extends Object

Encapsulates an action in the specification. It stores the Java code as String together with a priority (line number in the specification).
Constructor Summary
Action(String content, int priority)
Creates a new Action object with specified content and line number.
Action(String content, int priority, boolean isLookAction)
Method Summary
ActiongetHigherPriority(Action other)
Compares the priority value of this Action with the specified action.
inthashCode()
Returns a hash value for this Action
booleanisEquiv(Action a)
Returns true iff the parameter is an Action with the same content as this one.
StringtoString()
Returns the String representation of this object.

Constructor Detail

Action

public Action(String content, int priority)
Creates a new Action object with specified content and line number.

Action

public Action(String content, int priority, boolean isLookAction)

Method Detail

getHigherPriority

public Action getHigherPriority(Action other)
Compares the priority value of this Action with the specified action.

Parameters: other the other Action to compare this Action with.

Returns: this Action if it has higher priority - the specified one, if not.

hashCode

public int hashCode()
Returns a hash value for this Action

isEquiv

public boolean isEquiv(Action a)
Returns true iff the parameter is an Action with the same content as this one.

Parameters: obj the object to compare this Action with

toString

public String toString()
Returns the String representation of this object.