com.davisor.data.stream
Class ReversedDataBuffer
java.lang.Object
com.davisor.data.stream.IndirectDataBuffer
com.davisor.data.stream.ReversedDataBuffer
- All Implemented Interfaces:
- Data, DataBuffer, DataSource
- public class ReversedDataBuffer
- extends IndirectDataBuffer
ReversedDataBuffer implements a reversed view to the underlying data buffer.
The underlying data buffer is reversed in row order, that is the first row
of the underlying data buffer is the last row of this buffer and vice versa.
- Since:
- JDK1.2
- See Also:
Type
|
Method Summary |
DataValue |
getData(int index)
Gets the specific data element from the data buffer. |
DataStream |
getStream(boolean reversed)
Gets a new data stream from the data source. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
ReversedDataBuffer
public ReversedDataBuffer(DataBuffer dataBuffer)
- Constructs a new ReversedDataBuffer from the given DataBuffer.
getData
public DataValue getData(int index)
throws com.davisor.core.InvalidIndexException
- Gets the specific data element from the data buffer.
- Specified by:
getData in interface DataBuffer- Specified by:
getData in class IndirectDataBuffer
- Parameters:
index - data element index
- Throws:
com.davisor.core.InvalidIndexException - if no data is bound to given index
getStream
public DataStream getStream(boolean reversed)
throws InvalidDataException
- Gets a new data stream from the data source.
- Specified by:
getStream in interface DataBuffer- Specified by:
getStream in class IndirectDataBuffer
- Parameters:
reversed - controls if stream reads buffer forwards or backwards
- Throws:
InvalidDataException
Copyright © 2001-2004 Davisor Oy. All Rights Reserved.