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 boolean
add(T stmt)
Adds an element to this buffer list.boolean
addAll(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.int
capacity()
void
clear()
T
getAt(int index)
boolean
isEmpty()
boolean
isFull()
com.google.common.collect.PeekingIterator<T>
iterator()
int
size()
Returns the actual number of elements in the buffer list.BufferList<T>
sort(java.util.Comparator<? super T> theComparator)
void
truncate(int size)
-
-
-
Method Detail
-
add
boolean add(T stmt)
Adds an element to this buffer list.- Specified by:
add
in 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:
isEmpty
in interfacejava.util.Collection<T>
-
isFull
boolean isFull()
-
iterator
com.google.common.collect.PeekingIterator<T> iterator()
-
clear
void clear()
- Specified by:
clear
in 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:
size
in interfacejava.util.Collection<T>
- Returns:
-
capacity
int capacity()
-
sort
BufferList<T> sort(java.util.Comparator<? super T> theComparator)
-
getAt
T getAt(int index)
-
-