public class GenericBuffer<T> extends java.lang.Object
|Constructor and Description|
|Modifier and Type||Method and Description|
Adds a value to the buffer.
Retrieves the value in the buffer corresponding to the context if it exists.
public GenericBuffer(int bufferSize)
bufferSize- The buffer size. Adding data to a full buffer will cause the oldest data present in the buffer to be overwritten;
public void addValue(T value, java.lang.String context)
value- The value to add. Can't be null.
context- The context for which this value is valid. This basically represents the current value of all the variables which control the value is correct. The context is used to find this value in the buffer. If the context is already associated in the buffer with a value, nothing is added nor modified.
public T getValue(java.lang.String context)
context- The context of the searched value. The context represents all the variables values for which this value is correct.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.