org.apache.commons.collections
Interface BoundedCollection<E>

All Superinterfaces:
Collection<E>, Iterable<E>
All Known Implementing Classes:
BoundedFifoBuffer, CircularFifoBuffer, FixedSizeList, UnmodifiableBoundedCollection

public interface BoundedCollection<E>
extends Collection<E>

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:
Commons Collections 3.0
Version:
$Revision: 1.1.1.1 $ $Date: 2005/05/23 04:32:38 $
Author:
Matt Hall, John Watkinson, Herve Quiroz, Stephen Colebourne
See Also:
CollectionUtils.isFull(java.util.Collection), CollectionUtils.maxSize(java.util.Collection)

Method Summary
 boolean isFull()
          Returns true if this collection is full and no new elements can be added.
 int maxSize()
          Gets the maximum size of the collection (the bound).
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Method Detail

isFull

boolean isFull()
Returns true if this collection is full and no new elements can be added.

Returns:
true if the collection is full

maxSize

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

Returns:
the maximum number of elements the collection can hold


Copyright © 2005-2005 Apache Software Foundation, Matt Hall, John Watkinson. All Rights Reserved.