simtools.data.buffer
Class SimpleBuffer

java.lang.Object
  extended by simtools.data.ValueProvider
      extended by simtools.data.buffer.Buffer
          extended by simtools.data.buffer.SimpleBuffer
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
ResizeableBuffer

public class SimpleBuffer
extends Buffer

The SimpleBuffer policy is to store up to bufferSize values of contiguous index.

Version:
1.0 2001
Author:
Nicolas Brodu
See Also:
Serialized Form

Nested Class Summary
 class SimpleBuffer.SimpleByteManipulator
          This class handles optimization for byte objects.
 class SimpleBuffer.SimpleDoubleManipulator
          This class handles optimization for double objects.
 class SimpleBuffer.SimpleFloatManipulator
          This class handles optimization for float objects.
 class SimpleBuffer.SimpleIntegerManipulator
          This class handles optimization for int objects.
 class SimpleBuffer.SimpleLongManipulator
          This class handles optimization for long objects.
 class SimpleBuffer.SimpleObjectManipulator
          This class handles optimization for Object objects.
 class SimpleBuffer.SimpleShortManipulator
          This class handles optimization for short objects.
 
Nested classes/interfaces inherited from class simtools.data.buffer.Buffer
Buffer.ByteManipulator, Buffer.DoubleManipulator, Buffer.FloatManipulator, Buffer.IntegerManipulator, Buffer.LongManipulator, Buffer.Manipulator, Buffer.ObjectManipulator, Buffer.ShortManipulator
 
Field Summary
protected  boolean[] valid
           
 
Fields inherited from class simtools.data.buffer.Buffer
byteManipulator, doubleManipulator, endIndex, floatManipulator, intManipulator, longManipulator, objectManipulator, provider, shortManipulator, startIndex
 
Fields inherited from class simtools.data.ValueProvider
ByteProvider, DoubleProvider, FloatProvider, IntegerProvider, kind, LongProvider, ObjectProvider, ShortProvider
 
Constructor Summary
SimpleBuffer()
           
SimpleBuffer(int type)
           
SimpleBuffer(int type, ValueProvider vp)
           
SimpleBuffer(int type, ValueProvider prov, int size)
           
SimpleBuffer(ValueProvider prov)
           
SimpleBuffer(ValueProvider prov, int size)
           
 
Method Summary
 java.lang.Object clone()
           
protected  Buffer.Manipulator createManipulator(int kind)
          Manipulator factory Subclasses shall implement it to return their specialized versions of Manipulators.
protected  void initialize(int size)
           
 
Methods inherited from class simtools.data.buffer.Buffer
clear, getByteValue, getDoubleValue, getEndIndex, getFloatValue, getIntegerValue, getKind, getLongValue, getProvider, getShortValue, getStartIndex, getValue, setByteValue, setDoubleValue, setFloatValue, setIntegerValue, setLongValue, setProvider, setShortValue, setSlice, setValue
 
Methods inherited from class simtools.data.ValueProvider
getObjectValue, valueClass
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

valid

protected transient boolean[] valid
Constructor Detail

SimpleBuffer

public SimpleBuffer()

SimpleBuffer

public SimpleBuffer(ValueProvider prov)

SimpleBuffer

public SimpleBuffer(int type)

SimpleBuffer

public SimpleBuffer(int type,
                    ValueProvider vp)

SimpleBuffer

public SimpleBuffer(ValueProvider prov,
                    int size)

SimpleBuffer

public SimpleBuffer(int type,
                    ValueProvider prov,
                    int size)
Method Detail

initialize

protected void initialize(int size)

clone

public java.lang.Object clone()
Overrides:
clone in class Buffer

createManipulator

protected Buffer.Manipulator createManipulator(int kind)
Description copied from class: Buffer
Manipulator factory Subclasses shall implement it to return their specialized versions of Manipulators.

Specified by:
createManipulator in class Buffer
Returns:
Manipulator a Manipulator which must be a subclass of the corresponding TypeManipulator.