|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jogamp.opengl.impl.MemoryObject
public class MemoryObject
Constructor Summary | |
---|---|
MemoryObject(long addr,
long size)
|
Method Summary | |
---|---|
boolean |
equals(Object obj)
Ignores the optional attached ByteBuffer intentionally. |
ByteBuffer |
getBuffer()
|
static int |
getHash32(long addr,
long size)
Generates a 32bit hash value by addr and size .Ignores the optional attached ByteBuffer intentionally. |
static long |
getHash64(long addr,
long size)
Generates a 64bit hash value by addr and size .Ignores the optional attached ByteBuffer intentionally. |
static MemoryObject |
getOrAddSafe(HashMap map,
MemoryObject obj0)
Verifies the hash map operation, ie slow add: if !map.contains(obj0), the values are verified (slow) fast get: if map.contains(obj0), the mapped value is compared with equals (fast) In case the above verification fails, a RuntimeException is thrown. In such case the calculation of the hash value should either be tuned, or we just cannot use hash mapping. |
int |
hashCode()
|
void |
setBuffer(ByteBuffer buffer)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MemoryObject(long addr, long size)
Method Detail |
---|
public void setBuffer(ByteBuffer buffer)
public ByteBuffer getBuffer()
public int hashCode()
hashCode
in class Object
getHash32(long, long)
public boolean equals(Object obj)
ByteBuffer
intentionally.
equals
in class Object
obj
is of type MemoryObject
and addr
and size
is equal.public static int getHash32(long addr, long size)
addr
and size
.ByteBuffer
intentionally.
public static long getHash64(long addr, long size)
addr
and size
.ByteBuffer
intentionally.
public String toString()
toString
in class Object
public static MemoryObject getOrAddSafe(HashMap map, MemoryObject obj0)
map
- the identity HashMap mapping MemoryObject to MemoryObjectobj0
- the MemoryObject to get or add in the map
obj0
!= return
,
or the added obj0
== return
.
RuntimeException
- if hash collision occurs
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |