simtools.data.buffer
Class DelayedBuffer.DelayedLongManipulator

java.lang.Object
  extended by simtools.data.buffer.Buffer.LongManipulator
      extended by simtools.data.buffer.SimpleBuffer.SimpleLongManipulator
          extended by simtools.data.buffer.ResizeableBuffer.ResizeableLongManipulator
              extended by simtools.data.buffer.DelayedBuffer.DelayedLongManipulator
All Implemented Interfaces:
java.lang.Cloneable, Buffer.Manipulator
Enclosing class:
DelayedBuffer

public class DelayedBuffer.DelayedLongManipulator
extends ResizeableBuffer.ResizeableLongManipulator

This class handles optimization for long objects.


Field Summary
 
Fields inherited from class simtools.data.buffer.SimpleBuffer.SimpleLongManipulator
buffer
 
Constructor Summary
DelayedBuffer.DelayedLongManipulator()
           
 
Method Summary
 void setSlice(long min, long max)
          Use this function to optimize the buffer on the given index range
 boolean setValue(long index, long value)
          Unlike parent's, this buffer deletes old elements and give priority to the newly set elements.
 
Methods inherited from class simtools.data.buffer.ResizeableBuffer.ResizeableLongManipulator
getValue
 
Methods inherited from class simtools.data.buffer.SimpleBuffer.SimpleLongManipulator
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelayedBuffer.DelayedLongManipulator

public DelayedBuffer.DelayedLongManipulator()
Method Detail

setValue

public boolean setValue(long index,
                        long value)
                 throws DataException
Unlike parent's, this buffer deletes old elements and give priority to the newly set elements. If buffer hasn't reached max size yet, let it grow by using parent's func.Also remember that setSlice sets a max size. If buffer has reached max size, paren'ts behaviour is to ignore the new value. We don't.

Overrides:
setValue in class ResizeableBuffer.ResizeableLongManipulator
Throws:
DataException

setSlice

public void setSlice(long min,
                     long max)
Use this function to optimize the buffer on the given index range

Overrides:
setSlice in class ResizeableBuffer.ResizeableLongManipulator