Package org.fulib.fx.data
Class EvictingQueue<T>
java.lang.Object
org.fulib.fx.data.EvictingQueue<T>
- Type Parameters:
T- The type of items in the queue
- All Implemented Interfaces:
SizeableTraversableQueue<T>,TraversableQueue<T>
A queue with a certain site overwriting the oldest entry when full.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
EvictingQueue
public EvictingQueue(int size)
-
-
Method Details
-
insert
- Specified by:
insertin interfaceTraversableQueue<T>
-
peek
- Specified by:
peekin interfaceTraversableQueue<T>
-
back
- Specified by:
backin interfaceTraversableQueue<T>
-
forward
- Specified by:
forwardin interfaceTraversableQueue<T>
-
current
- Specified by:
currentin interfaceTraversableQueue<T>
-
entries
- Specified by:
entriesin interfaceTraversableQueue<T>
-
equals
-
hashCode
public int hashCode() -
length
public int length()- Specified by:
lengthin interfaceTraversableQueue<T>
-
size
public int size()Description copied from interface:SizeableTraversableQueueReturns the maximum size of the queue.- Specified by:
sizein interfaceSizeableTraversableQueue<T>- Returns:
- The maximum size of the queue.
-
setSize
public void setSize(int size) Description copied from interface:SizeableTraversableQueueSets the maximum size of the queue. If the current size is larger than the new size, the oldest elements will be removed.- Specified by:
setSizein interfaceSizeableTraversableQueue<T>- Parameters:
size- the new size
-