JFlex
Class Action

java.lang.Object
  extended byJFlex.Action

public final class Action
extends java.lang.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(java.lang.String content, int priority)
          Creates a new Action object with specified content and line number.
Action(java.lang.String content, int priority, boolean isLookAction)
           
 
Method Summary
 Action getHigherPriority(Action other)
          Compares the priority value of this Action with the specified action.
 int hashCode()
          Returns a hash value for this Action
 boolean isEquiv(Action a)
          Returns true iff the parameter is an Action with the same content as this one.
 java.lang.String toString()
          Returns the String representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Action

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


Action

public Action(java.lang.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.

toString

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


isEquiv

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


hashCode

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