NASA World Wind

gov.nasa.worldwind.util
Class TupleBufferFactory.BasicTupleBufferFactory

java.lang.Object
  extended by gov.nasa.worldwind.util.TupleBufferFactory
      extended by gov.nasa.worldwind.util.TupleBufferFactory.BasicTupleBufferFactory
Direct Known Subclasses:
TupleBufferFactory.ByteTupleBufferFactory, TupleBufferFactory.DoubleTupleBufferFactory, TupleBufferFactory.FloatTupleBufferFactory, TupleBufferFactory.IntTupleBufferFactory, TupleBufferFactory.ShortTupleBufferFactory
Enclosing class:
TupleBufferFactory

public static class TupleBufferFactory.BasicTupleBufferFactory
extends TupleBufferFactory

Implementation of TupleBufferFactory which constructs instances of VecBuffer according to a specified tuple size and BufferFactory.


Nested Class Summary
 
Nested classes/interfaces inherited from class gov.nasa.worldwind.util.TupleBufferFactory
TupleBufferFactory.BasicTupleBufferFactory, TupleBufferFactory.ByteTupleBufferFactory, TupleBufferFactory.DoubleTupleBufferFactory, TupleBufferFactory.FloatTupleBufferFactory, TupleBufferFactory.IntTupleBufferFactory, TupleBufferFactory.ShortTupleBufferFactory
 
Field Summary
protected  BufferFactory bufferFactory
           
protected  int tupleSize
           
 
Constructor Summary
TupleBufferFactory.BasicTupleBufferFactory(int tupleSize, BufferFactory bufferFactory)
          Constructs a new BasicTupleBufferFactory with the specified tuple size and BufferFactory.
 
Method Summary
 VecBuffer newBuffer(int size)
          Constructs a new VecBuffer with the specified size, backed by a BufferWrapper.
protected  VecBuffer newTupleBuffer(int tupleSize, BufferWrapper buffer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bufferFactory

protected final BufferFactory bufferFactory

tupleSize

protected final int tupleSize
Constructor Detail

TupleBufferFactory.BasicTupleBufferFactory

public TupleBufferFactory.BasicTupleBufferFactory(int tupleSize,
                                                  BufferFactory bufferFactory)
Constructs a new BasicTupleBufferFactory with the specified tuple size and BufferFactory.

Parameters:
tupleSize - the number of coordinates per logical tuple.
bufferFactory - the factory to use for constructing the VecBuffer's backing BufferWrapper.
Throws:
java.lang.IllegalArgumentException - is the tuple size is negative, or if the buffer factory is null.
Method Detail

newBuffer

public VecBuffer newBuffer(int size)
Constructs a new VecBuffer with the specified size, backed by a BufferWrapper.

Specified by:
newBuffer in class TupleBufferFactory
Parameters:
size - the new VecBuffer's size, in tuples.
Returns:
the new VecBuffer.
Throws:
java.lang.IllegalArgumentException - if size is negative.

newTupleBuffer

protected VecBuffer newTupleBuffer(int tupleSize,
                                   BufferWrapper buffer)

NASA World Wind