public class SimpleStack<E> extends Object implements Collection<E>
| Modifier and Type | Class and Description |
|---|---|
private static class |
SimpleStack.StackIterator<E> |
| Constructor and Description |
|---|
SimpleStack() |
SimpleStack(Collection<? extends E> collection) |
SimpleStack(int initSize) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e) |
boolean |
addAll(Collection<? extends E> collection) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> collection) |
E |
get() |
E |
get(int index) |
E |
getAndRemove() |
boolean |
isEmpty() |
Iterator<E> |
iterator() |
void |
remove() |
boolean |
remove(Object arg0) |
boolean |
removeAll(Collection<?> arg0) |
boolean |
retainAll(Collection<?> arg0) |
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] array) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitequals, hashCode, parallelStream, removeIf, spliterator, streampublic SimpleStack()
public SimpleStack(int initSize)
public SimpleStack(Collection<? extends E> collection)
public boolean add(E e)
add in interface Collection<E>public boolean addAll(Collection<? extends E> collection)
addAll in interface Collection<E>public void clear()
clear in interface Collection<E>public boolean contains(Object o)
contains in interface Collection<E>public boolean containsAll(Collection<?> collection)
containsAll in interface Collection<E>public boolean isEmpty()
isEmpty in interface Collection<E>public boolean remove(Object arg0)
remove in interface Collection<E>public boolean removeAll(Collection<?> arg0)
removeAll in interface Collection<E>public boolean retainAll(Collection<?> arg0)
retainAll in interface Collection<E>public int size()
size in interface Collection<E>public Object[] toArray()
toArray in interface Collection<E>public <T> T[] toArray(T[] array)
toArray in interface Collection<E>public E get(int index)
public E get()
public E getAndRemove()
public void remove()
Copyright © 2015–2020. All rights reserved.