|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
com.sun.xml.bind.v2.util.CollisionCheckStack<E>
public final class CollisionCheckStack<E>
Stack
-like data structure that allows the following efficient operations:
Object equality is their identity equality.
This class implements List
for accessing items in the stack,
but List
methods that alter the stack is not supported.
Field Summary |
---|
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
CollisionCheckStack()
|
Method Summary | |
---|---|
E |
get(int index)
|
java.lang.String |
getCycleString()
String that represents the cycle. |
boolean |
getUseIdentity()
|
E |
peek()
Returns the top of the stack. |
E |
pop()
Pops an object from the stack |
boolean |
push(E o)
Pushes a new object to the stack. |
void |
pushNocheck(E o)
Pushes a new object to the stack without making it participate with the collision check. |
void |
reset()
Clears all the contents in the stack. |
void |
setUseIdentity(boolean useIdentity)
Set to false to use Object.equals(Object) to detect cycles. |
int |
size()
|
Methods inherited from class java.util.AbstractList |
---|
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList |
Methods inherited from class java.util.AbstractCollection |
---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
Constructor Detail |
---|
public CollisionCheckStack()
Method Detail |
---|
public void setUseIdentity(boolean useIdentity)
Object.equals(Object)
to detect cycles.
This method can be only used when the stack is empty.
public boolean getUseIdentity()
public boolean push(E o)
public void pushNocheck(E o)
public E get(int index)
get
in interface java.util.List<E>
get
in class java.util.AbstractList<E>
public int size()
size
in interface java.util.Collection<E>
size
in interface java.util.List<E>
size
in class java.util.AbstractCollection<E>
public E pop()
public E peek()
public void reset()
public java.lang.String getCycleString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |