Mapper
Class Rule

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<Production>
              extended by Mapper.Rule
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<Production>, java.util.Collection<Production>, java.util.List<Production>, java.util.RandomAccess

public class Rule
extends java.util.ArrayList<Production>

Rule extends Arraylist.

Author:
EHemberg
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
Rule()
          Creates a new rule
Rule(int newLength)
          Creates a new rule with newLength elements.
Rule(Rule copy)
          Copy constructor.
 
Method Summary
 Symbol getLHS()
          Get the left hand symbol of the rule
 int getMinimumDepth()
          Return the minimum mapping depth of this rule.
 boolean getRecursive()
          Return the recursive nature of this rule.
 void setLHS(Symbol s)
          Set the left hand side symbol of the rule Must be a Non Terminal symbol.
 void setMinimumDepth(int newMinimumDepth)
          Update the minimum mapping depth of this Rule.
 void setRecursive(boolean newRecursive)
          Update the recursive nature of this rule.
 java.lang.String toString()
           
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

Rule

public Rule(int newLength)
Creates a new rule with newLength elements.

Parameters:
newLength - initial length of rule

Rule

public Rule()
Creates a new rule


Rule

public Rule(Rule copy)
Copy constructor.

Parameters:
copy - rule to copy
Method Detail

getRecursive

public boolean getRecursive()
Return the recursive nature of this rule.

Returns:
true if rule is recursive

setRecursive

public void setRecursive(boolean newRecursive)
Update the recursive nature of this rule.

Parameters:
newRecursive - set recursiveness

getMinimumDepth

public int getMinimumDepth()
Return the minimum mapping depth of this rule.

Returns:
minimum depth

setMinimumDepth

public void setMinimumDepth(int newMinimumDepth)
Update the minimum mapping depth of this Rule.

Parameters:
newMinimumDepth - minimum depth

setLHS

public void setLHS(Symbol s)
Set the left hand side symbol of the rule Must be a Non Terminal symbol.

Parameters:
s - left hand side symbol

getLHS

public Symbol getLHS()
Get the left hand symbol of the rule

Returns:
left hand side symbol

toString

public java.lang.String toString()
Overrides:
toString in class java.util.AbstractCollection<Production>