com.jogamp.common.nio
Class AbstractLongBuffer

java.lang.Object
  extended by com.jogamp.common.nio.AbstractBuffer
      extended by com.jogamp.common.nio.AbstractLongBuffer
All Implemented Interfaces:
NativeBuffer
Direct Known Subclasses:
Int64Buffer, PointerBuffer

public abstract class AbstractLongBuffer
extends AbstractBuffer

Hardware independent container for native pointer arrays. The native values (NIO direct ByteBuffer) might be 32bit or 64bit wide, depending of the CPU pointer width.

Author:
Michael Bien, Sven Gothel

Field Summary
protected  long[] backup
           
protected  HashMap dataMap
           
 
Fields inherited from class com.jogamp.common.nio.AbstractBuffer
bb, capacity, position
 
Constructor Summary
protected AbstractLongBuffer(ByteBuffer bb, int elementSize)
           
 
Method Summary
 long[] array()
           
 long get()
          Relative get method.
abstract  long get(int idx)
          Absolute get method.
 AbstractLongBuffer get(long[] dest, int offset, int length)
          Relative bulk get method.
 boolean hasArray()
           
 AbstractLongBuffer put(AbstractLongBuffer src)
          Relative bulk get method.
abstract  AbstractLongBuffer put(int index, long value)
          Absolute put method.
 AbstractLongBuffer put(long value)
          Relative put method.
 AbstractLongBuffer put(long[] src, int offset, int length)
          Relative bulk put method.
 
Methods inherited from class com.jogamp.common.nio.AbstractBuffer
arrayOffset, capacity, getBuffer, hasRemaining, isDirect, limit, position, position, remaining, rewind, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

backup

protected long[] backup

dataMap

protected HashMap dataMap
Constructor Detail

AbstractLongBuffer

protected AbstractLongBuffer(ByteBuffer bb,
                             int elementSize)
Method Detail

hasArray

public final boolean hasArray()
Specified by:
hasArray in interface NativeBuffer
Overrides:
hasArray in class AbstractBuffer

array

public final long[] array()

get

public abstract long get(int idx)
Absolute get method. Get the pointer value at the given index


get

public final long get()
Relative get method. Get the pointer value at the current position and increment the position by one.


get

public final AbstractLongBuffer get(long[] dest,
                                    int offset,
                                    int length)
Relative bulk get method. Copy the pointer values [ position .. position+length [ to the destination array [ dest[offset] .. dest[offset+length] [ and increment the position by length.


put

public abstract AbstractLongBuffer put(int index,
                                       long value)
Absolute put method. Put the pointer value at the given index


put

public final AbstractLongBuffer put(long value)
Relative put method. Put the pointer value at the current position and increment the position by one.


put

public final AbstractLongBuffer put(long[] src,
                                    int offset,
                                    int length)
Relative bulk put method. Put the pointer values [ src[offset] .. src[offset+length] [ at the current position and increment the position by length.


put

public AbstractLongBuffer put(AbstractLongBuffer src)
Relative bulk get method. Copy the source values src[position .. capacity] [ to this buffer and increment the position by capacity-position.