org.eclipse.xtext.util
Class AbstractLinkedStack<THIS extends AbstractLinkedStack<?,ELEMENT>,ELEMENT>
java.lang.Object
org.eclipse.xtext.util.AbstractLinkedStack<THIS,ELEMENT>
- All Implemented Interfaces:
- java.lang.Iterable<ELEMENT>
- Direct Known Subclasses:
- LinkedStack, RuleCallStack
public abstract class AbstractLinkedStack<THIS extends AbstractLinkedStack<?,ELEMENT>,ELEMENT>
- extends java.lang.Object
- implements java.lang.Iterable<ELEMENT>
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
top
protected AbstractLinkedStack.Element<ELEMENT> top
AbstractLinkedStack
public AbstractLinkedStack()
clone
public THIS clone()
- Overrides:
clone
in class java.lang.Object
cloneAndPop
public THIS cloneAndPop()
cloneAndPush
public THIS cloneAndPush(ELEMENT element)
contains
public boolean contains(ELEMENT value)
createElement
protected AbstractLinkedStack.Element<ELEMENT> createElement(AbstractLinkedStack.Element<ELEMENT> parent,
ELEMENT value)
createStack
protected abstract THIS createStack()
elementToStr
public java.lang.String elementToStr(ELEMENT value)
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
init
protected void init(THIS result)
isEmpty
public boolean isEmpty()
iterator
public java.util.Iterator<ELEMENT> iterator()
- Specified by:
iterator
in interface java.lang.Iterable<ELEMENT>
- Since:
- 2.0
peek
public ELEMENT peek()
pop
public ELEMENT pop()
push
public void push(ELEMENT value)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object