|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.util.BufferFactory
public abstract class BufferFactory
BufferFactory provides a general factory interface for creating instances of BufferWrapper, without having to know the underlying data type. Once created, a
BufferWrapper abstracts reading and writing buffer data from the underlying data type. When BufferWrapper is combined
with BufferFactory, a component may create and work with buffer data in a type agnostic manner.
BufferFactory.ByteBufferFactory,
BufferFactory.ShortBufferFactory, BufferFactory.IntBufferFactory,
BufferFactory.FloatBufferFactory, and BufferFactory.DoubleBufferFactory.
BufferWrapper| Nested Class Summary | |
|---|---|
static class |
BufferFactory.ByteBufferFactory
Implementation of BufferFactory which constructs instances of BufferWrapper.ByteBufferWrapper |
static class |
BufferFactory.DoubleBufferFactory
Implementation of BufferFactory which constructs instances of BufferWrapper.DoubleBufferWrapper |
static class |
BufferFactory.FloatBufferFactory
Implementation of BufferFactory which constructs instances of BufferWrapper.FloatBufferWrapper |
static class |
BufferFactory.IntBufferFactory
Implementation of BufferFactory which constructs instances of BufferWrapper.IntBufferWrapper |
static class |
BufferFactory.ShortBufferFactory
Implementation of BufferFactory which constructs instances of BufferWrapper.ShortBufferWrapper |
| Constructor Summary | |
|---|---|
protected |
BufferFactory()
Constructs a new BufferFactory with the default buffer allocation policy. |
protected |
BufferFactory(boolean allocateDirect)
Constructs a new BufferFactory with the specified buffer allocation policy. |
| Method Summary | |
|---|---|
boolean |
isAllocateDirect()
|
abstract BufferWrapper |
newBuffer(int size)
Constructs a new BufferWrapper of the specified size. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected BufferFactory()
protected BufferFactory(boolean allocateDirect)
allocateDirect - true to allocate and return BufferWrappers backed by direct buffers, false to allocate and
return BufferWrappers backed by non-direct buffers.| Method Detail |
|---|
public boolean isAllocateDirect()
public abstract BufferWrapper newBuffer(int size)
size - the new buffer's size, in number of underlying data type units (bytes, shorts, ints, floats, or
doubles).
IllegalArgumentException - if size is negative.
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||