public interface IBuffer<T> extends ReifiedIterable<T>
Modifier and Type | Method and Description |
---|---|
void |
clear()
Empties the buffer.
|
boolean |
contains(T obj)
Checks if an object is contained in the buffer.
|
T |
get()
Retrieves an object from the buffer.
|
int |
getMaxSize()
Returns the maximum size of the buffer
|
boolean |
isEmpty()
Returns true if the buffer is empty.
|
boolean |
isFull()
Return true if the buffer is full.
|
boolean |
put(T obj)
Puts an object in the buffer.
|
int |
size()
Returns the size of the buffer
|
T[] |
toArray()
Puts all elements in an array and returns them.
|
ReifiedList<T> |
toList()
Puts all elements in a list and returns them.
|
getGenericTypeParameter
void clear()
boolean contains(T obj)
obj
- The object to find.java.lang.NullPointerException
- When the object is null.int getMaxSize()
boolean isEmpty()
boolean isFull()
T get()
boolean put(T obj)
obj
- The object to put.java.lang.NullPointerException
- When the object is null.int size()
T[] toArray()
ReifiedList<T> toList()