bb.util
Class BufferFixed.State<E>

java.lang.Object
  extended by bb.util.BufferFixed.State<E>
Enclosing class:
BufferFixed<E>

public static class BufferFixed.State<E>
extends Object

Used to record a snapshot of the state of a BufferFixed instance.

This class is not multithread safe. (Its immediate state is immutable, however, the deque field is mutable.)


Field Summary
 Deque<E> deque
          Copy of the deque field.
 long numDropped
          Copy of the numDropped field.
 int sizeMax
          Copy of the sizeMax field.
 
Constructor Summary
private BufferFixed.State(BufferFixed<E> buffer)
           
 
Method Summary
 String getDescription()
          Returns a short description of the number of items received and possibly dropped.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sizeMax

public final int sizeMax
Copy of the sizeMax field.


deque

public final Deque<E> deque
Copy of the deque field.


numDropped

public final long numDropped
Copy of the numDropped field.

Constructor Detail

BufferFixed.State

private BufferFixed.State(BufferFixed<E> buffer)
Method Detail

getDescription

public String getDescription()
Returns a short description of the number of items received and possibly dropped.

Contract: the result is never blank, and never ends with a newline sequence (altho it may internally contain newlines).