torero.model
Class Production.ListElement

java.lang.Object
  |
  +--torero.model.Production.ListElement
All Implemented Interfaces:
Serializable
Enclosing class:
Production

public class Production.ListElement
extends Object
implements Serializable

Inner Class for representing the unique Position of a Symbol inside a Production. Encapsulates the Symbol that is used on a certain position/place inside an Production.

See Also:
Serialized Form

Constructor Summary
Production.ListElement(Symbol ref, boolean islhs)
           
 
Method Summary
 boolean equals(Object o)
          Returns true if they encapsulate the same Symbol.
 Symbol getRefSymbol()
          Returns the encapsulated Symbol.
 boolean isCompatible(Production.ListElement le)
          Return true if they encapsulate the same Symbol and they are on different Sides (LHS , RHS) of the Production.
 boolean looksequal(Production.ListElement le)
          Return true if they encapsulate the same Symbol.
 void setRefSymbol(Symbol ref)
          Sets ref as Symbol that should be encapsulated.
 String toDot(Derivat der)
          Support for Dot File generation.
 String toDotLabel(Derivat der, String offset)
          Support for Dot File generation.
 String toString()
           
 String toString2()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Production.ListElement

public Production.ListElement(Symbol ref,
                              boolean islhs)
Method Detail

setRefSymbol

public void setRefSymbol(Symbol ref)
Sets ref as Symbol that should be encapsulated.
Parameters:
ref - the Symbol that should be encapsulated.

getRefSymbol

public Symbol getRefSymbol()
Returns the encapsulated Symbol.
Returns:
returns the encapsulated Symbol.

toString

public String toString()
Overrides:
toString in class Object

toString2

public String toString2()

toDot

public String toDot(Derivat der)
Support for Dot File generation.

toDotLabel

public String toDotLabel(Derivat der,
                         String offset)
Support for Dot File generation.

looksequal

public boolean looksequal(Production.ListElement le)
Return true if they encapsulate the same Symbol.
Returns:
true if they encapsulate the same Symbol.

isCompatible

public boolean isCompatible(Production.ListElement le)
Return true if they encapsulate the same Symbol and they are on different Sides (LHS , RHS) of the Production.
Returns:
true if they encapsulate the same Symbol and are on different Sides (LHS , RHS) of the Production.

equals

public boolean equals(Object o)
Returns true if they encapsulate the same Symbol.
Overrides:
equals in class Object
Returns:
true if they encapsulate the same Symbol.