diff options
author | Michael Bien <[email protected]> | 2011-02-09 22:19:22 +0100 |
---|---|---|
committer | Michael Bien <[email protected]> | 2011-02-09 22:19:22 +0100 |
commit | e581ea0e1f65101a7d4baf99d18fa43e1aa20b01 (patch) | |
tree | d41b99d3ea1dd68e7054e63778aee5208980409d /src/java/com/jogamp/common/nio/Int64Buffer.java | |
parent | e20879b9f124ecca8bc7467013e118d1b7f5782b (diff) |
- removed CDC impl for com.jogamp.common.nio
- generified class hierarchy (casts no longer needed in client code)
- @Override where needed and other minor changes
Diffstat (limited to 'src/java/com/jogamp/common/nio/Int64Buffer.java')
-rw-r--r-- | src/java/com/jogamp/common/nio/Int64Buffer.java | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/src/java/com/jogamp/common/nio/Int64Buffer.java b/src/java/com/jogamp/common/nio/Int64Buffer.java index 32fba03..968e48d 100644 --- a/src/java/com/jogamp/common/nio/Int64Buffer.java +++ b/src/java/com/jogamp/common/nio/Int64Buffer.java @@ -28,7 +28,6 @@ package com.jogamp.common.nio; -import com.jogamp.common.os.*; import java.nio.ByteBuffer; /** @@ -39,35 +38,22 @@ import java.nio.ByteBuffer; * @author Michael Bien * @author Sven Gothel */ -public abstract class Int64Buffer extends AbstractLongBuffer { +public abstract class Int64Buffer extends AbstractLongBuffer<Int64Buffer> { protected Int64Buffer(ByteBuffer bb) { super(bb, elementSize()); } public static Int64Buffer allocate(int size) { - if (Platform.isJavaSE()) { - return new Int64BufferSE(ByteBuffer.wrap(new byte[elementSize() * size])); - } else { - return new Int64BufferME_CDC_FP(ByteBuffer.wrap(new byte[elementSize() * size])); - } + return new Int64BufferSE(ByteBuffer.wrap(new byte[elementSize() * size])); } public static Int64Buffer allocateDirect(int size) { - if (Platform.isJavaSE()) { - return new Int64BufferSE(Buffers.newDirectByteBuffer(elementSize() * size)); - } else { - return new Int64BufferME_CDC_FP(Buffers.newDirectByteBuffer(elementSize() * size)); - } + return new Int64BufferSE(Buffers.newDirectByteBuffer(elementSize() * size)); } public static Int64Buffer wrap(ByteBuffer src) { - Int64Buffer res; - if (Platform.isJavaSE()) { - res = new Int64BufferSE(src); - } else { - res = new Int64BufferME_CDC_FP(src); - } + Int64Buffer res = new Int64BufferSE(src); res.updateBackup(); return res; @@ -77,6 +63,7 @@ public abstract class Int64Buffer extends AbstractLongBuffer { return Buffers.SIZEOF_LONG; } + @Override public String toString() { return "Int64Buffer:"+super.toString(); } |