Top Description Methods
org.apache.commons.collections4

public Interface BoundedCollection<E>

extends Collection<E>
Known Direct Implementers
org.apache.commons.collections4.collection.UnmodifiableBoundedCollection, org.apache.commons.collections4.list.FixedSizeList, org.apache.commons.collections4.queue.CircularFifoQueue
Type Parameters
<E>
the type of elements in this collection
Imports
java.util.Collection

Defines a collection that is bounded in size.

The size of the collection can vary, but it can never exceed a preset maximum number of elements. This interface allows the querying of details associated with the maximum number of elements.

Since
3.0
See Also
CollectionUtils#isFull, CollectionUtils#maxSize

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the collection is full.
isFull
()

Returns true if this collection is full and no new elements can be added.

public int

Returns:

the maximum number of elements the collection can hold.
maxSize
()

Gets the maximum size of the collection (the bound).

Inherited from java.util.Collection:
addaddAllclearcontainscontainsAllequalshashCodeisEmptyiteratorparallelStreamremoveremoveAllremoveIfretainAllsizespliteratorstreamtoArraytoArraytoArray

Method Detail

isFullback to summary
public boolean isFull()

Returns true if this collection is full and no new elements can be added.

Returns:boolean

true if the collection is full.

maxSizeback to summary
public int maxSize()

Gets the maximum size of the collection (the bound).

Returns:int

the maximum number of elements the collection can hold.