Package com.complexible.common.collect
Interface BufferList<T>
-
- All Superinterfaces:
java.util.Collection<T>,java.lang.Iterable<T>
- All Known Subinterfaces:
ExtendedBufferList<T>
public interface BufferList<T> extends java.util.Collection<T>- Since:
- 3.0
- Version:
- 3.0
- Author:
- Evren Sirin
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanadd(T stmt)Adds an element to this buffer list.booleanaddAll(BufferList<T> theElement)Adds the contents of another buffer list to this one.<E extends T>
E[]array()Returns the array which stores the contents of this buffer list.intcapacity()voidclear()TgetAt(int index)booleanisEmpty()booleanisFull()com.google.common.collect.PeekingIterator<T>iterator()intsize()Returns the actual number of elements in the buffer list.BufferList<T>sort(java.util.Comparator<? super T> theComparator)voidtruncate(int size)
-
-
-
Method Detail
-
add
boolean add(T stmt)
Adds an element to this buffer list.- Specified by:
addin interfacejava.util.Collection<T>- Parameters:
stmt-- Returns:
- true if the buffer list reached its maximum capacity
-
addAll
boolean addAll(BufferList<T> theElement)
Adds the contents of another buffer list to this one.- Parameters:
theElement-- Returns:
- true if the buffer list reached its maximum capacity
-
isEmpty
boolean isEmpty()
- Specified by:
isEmptyin interfacejava.util.Collection<T>
-
isFull
boolean isFull()
-
iterator
com.google.common.collect.PeekingIterator<T> iterator()
-
clear
void clear()
- Specified by:
clearin interfacejava.util.Collection<T>
-
truncate
void truncate(int size)
-
array
<E extends T> E[] array()
Returns the array which stores the contents of this buffer list. Length of the array can be greater than the number of stored elements.- Returns:
-
size
int size()
Returns the actual number of elements in the buffer list.- Specified by:
sizein interfacejava.util.Collection<T>- Returns:
-
capacity
int capacity()
-
sort
BufferList<T> sort(java.util.Comparator<? super T> theComparator)
-
getAt
T getAt(int index)
-
-