E - private static class PSquarePercentile.FixedCapacityList<E>
extends java.util.ArrayList<E>
implements java.io.Serializable
add is a no-op, returning
false.| Modifier and Type | Field and Description |
|---|---|
private int |
capacity
Capacity of the list
|
private static long |
serialVersionUID
Serialization Version Id
|
| Constructor and Description |
|---|
PSquarePercentile.FixedCapacityList(int fixedCapacity)
This constructor constructs the list with given capacity and as well
as stores the capacity
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e)
In addition it checks if the
ArrayList.size() returns a
size that is within capacity and if true it adds; otherwise the list
contents are unchanged and false is returned. |
boolean |
addAll(java.util.Collection<? extends E> collection)
In addition it checks if the sum of Collection size and
this instance's
ArrayList.size() returns a value that is within
capacity and if true it adds the collection; otherwise the list
contents are unchanged and false is returned. |
add, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeRange, retainAll, set, size, subList, toArray, toArray, trimToSizeprivate static final long serialVersionUID
private final int capacity
public PSquarePercentile.FixedCapacityList(int fixedCapacity)
fixedCapacity - the capacity to be fixed for this listpublic boolean add(E e)
ArrayList.size() returns a
size that is within capacity and if true it adds; otherwise the list
contents are unchanged and false is returned.public boolean addAll(java.util.Collection<? extends E> collection)
ArrayList.size() returns a value that is within
capacity and if true it adds the collection; otherwise the list
contents are unchanged and false is returned.Copyright (c) 2003-2015 Apache Software Foundation