|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.util.GenericBuffer<T>
public class GenericBuffer<T>
The GenericBuffer class provides a way to minimize the effort needed to buffer any kind of information. This class is particularly suited to optimizations based on reusing already computed data.
| Constructor Summary | |
|---|---|
GenericBuffer(int bufferSize)
Sole constructor. |
|
| Method Summary | |
|---|---|
void |
addValue(T value,
String context)
Adds a value to the buffer. |
T |
getValue(String context)
Retrieves the value in the buffer corresponding to the context if it exists. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
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;| Method Detail |
|---|
public void addValue(T value,
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(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. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||