public class Storage<T> extends ArrayList<T>
Constructor and Description |
---|
Storage()
Creates a storage with initially empty storage.
|
Storage(int size)
Creates a storage with a given size.
|
Storage(List<T> storage)
Copies a given storage.
|
Modifier and Type | Method and Description |
---|---|
T |
last()
Returns the last element in the storage.
|
void |
removeLast()
Removes the last element from the storage.
|
void |
setSize(int size)
Sets the size to the given.
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll, toString
containsAll, equals, hashCode
parallelStream, stream
public Storage()
public Storage(int size)
size
- initial allocation size.public void setSize(int size)
size
- new size for the storage.public T last()
public void removeLast()
Copyright © 2010 - 2020 Adobe. All Rights Reserved