public class FIFOBufferHolder extends Object implements BufferHolder
| Constructor and Description |
|---|
FIFOBufferHolder() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Object replaceWithObj)
Add the passed object to the array if BufferList is not full or shouldReplaceWith returns true
|
BufferHolder |
copy()
return a usable copy of the BufferHolder
|
List |
getCollection()
Get the underlying collection
|
List |
getOrderedCollection()
Get the Collection in sorted order
|
void |
remove(Object replaceWithObj)
Remove the smallest element from the BufferList if the buffer is full and shouldReplaceWith(...)
returns true.
|
void |
setCollection(List list) |
boolean |
shouldReplaceWith(Object replaceWithObj)
Returns true if this object is greater than the smallest value in the buffer
|
public void add(Object replaceWithObj)
BufferHolderadd in interface BufferHolderpublic void remove(Object replaceWithObj)
BufferHolderremove in interface BufferHolderpublic boolean shouldReplaceWith(Object replaceWithObj)
BufferHoldershouldReplaceWith in interface BufferHolderpublic List getCollection()
BufferHoldergetCollection in interface BufferHolderpublic List getOrderedCollection()
BufferHoldergetOrderedCollection in interface BufferHolderpublic void setCollection(List list)
setCollection in interface BufferHolderpublic BufferHolder copy()
BufferHoldercopy in interface BufferHolderCopyright © 2015. All rights reserved.