Items are added at the front of the list. That is, the item at index 0 is more recent than that added at index 1. In this regard, this class resembles a stack.
| Modifier and Type | Field and Description |
|---|---|
| private final List | |
| private final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public boolean | |
| public E | |
| public void | |
| public int |
| backingList | back to summary |
|---|---|
| private final List<E> backingList | |
| maxSize | back to summary |
|---|---|
| private final int maxSize | |
| SizeLimitedList | back to summary |
|---|---|
| public SizeLimitedList(int maxSize) | |
| add | back to summary |
|---|---|
| public void add(E item) | |
| clear | back to summary |
|---|---|
| public void clear() | |
| contains | back to summary |
|---|---|
| public boolean contains(E item) | |
| get | back to summary |
|---|---|
| public E get(int index) | |
| removeIf | back to summary |
|---|---|
| public void removeIf(Predicate<? super E> predicate) | |
| size | back to summary |
|---|---|
| public int size() | |