Mapper
Class Rule
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<Production>
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
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 |
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
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>