Package org.apache.tools.ant.util
Class IdentityStack<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.Vector<E>
java.util.Stack<E>
org.apache.tools.ant.util.IdentityStack<E>
- All Implemented Interfaces:
- Serializable,- Cloneable,- Iterable<E>,- Collection<E>,- List<E>,- RandomAccess
Identity Stack.
- Since:
- Ant 1.7
- See Also:
- 
Field SummaryFields inherited from class java.util.VectorcapacityIncrement, elementCount, elementDataFields inherited from class java.util.AbstractListmodCount
- 
Constructor SummaryConstructorsConstructorDescriptionDefault constructor.IdentityStack(E o) Construct a new IdentityStack with the specified Object as the bottom element.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanOverride methods that use.equals()comparisons on elements.booleancontainsAll(Collection<?> c) static <E> IdentityStack<E>getInstance(Stack<E> s) Get an IdentityStack containing the contents of the specified Stack.intOverride methods that use.equals()comparisons on elements.intlastIndexOf(Object o, int pos) Override methods that use.equals()comparisons on elements.booleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) Methods inherited from class java.util.Vectoradd, add, addAll, addAll, addElement, capacity, clear, clone, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, forEach, get, hashCode, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, listIterator, listIterator, remove, remove, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, toString, trimToSizeMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.CollectionparallelStream, stream, toArray
- 
Constructor Details- 
IdentityStackpublic IdentityStack()Default constructor.
- 
IdentityStackConstruct a new IdentityStack with the specified Object as the bottom element.- Parameters:
- o- the bottom element.
 
 
- 
- 
Method Details- 
getInstanceGet an IdentityStack containing the contents of the specified Stack.- Type Parameters:
- E- desired type
- Parameters:
- s- the Stack to copy; ignored if null.
- Returns:
- an IdentityStack instance.
 
- 
containsOverride methods that use.equals()comparisons on elements.
- 
indexOfOverride methods that use.equals()comparisons on elements.
- 
lastIndexOfOverride methods that use.equals()comparisons on elements.- Overrides:
- lastIndexOfin class- Vector<E>
- Parameters:
- o- the Object to search for.
- pos- the position from which to search (backward).
- Returns:
- the position of the object, -1 if not found.
- See Also:
 
- 
removeAll
- 
retainAll
- 
containsAll- Specified by:
- containsAllin interface- Collection<E>
- Specified by:
- containsAllin interface- List<E>
- Overrides:
- containsAllin class- Vector<E>
 
 
-