summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/MemoryObject.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-07-03 16:21:36 +0200
committerSven Gothel <[email protected]>2014-07-03 16:21:36 +0200
commit556d92b63555a085b25e32b1cd55afce24edd07a (patch)
tree6be2b02c62a77d5aba81ffbe34c46960608be163 /src/jogl/classes/jogamp/opengl/MemoryObject.java
parenta90f4a51dffec3247278e3c683ed4462b1dd9ab5 (diff)
Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)
- Change non static accesses to static members using declaring type - Change indirect accesses to static members to direct accesses (accesses through subtypes) - Add final modifier to private fields - Add final modifier to method parameters - Add final modifier to local variables - Remove unnecessary casts - Remove unnecessary '$NON-NLS$' tags - Remove trailing white spaces on all lines
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/MemoryObject.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/MemoryObject.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/jogl/classes/jogamp/opengl/MemoryObject.java b/src/jogl/classes/jogamp/opengl/MemoryObject.java
index 6ebefc517..942d62b9e 100644
--- a/src/jogl/classes/jogamp/opengl/MemoryObject.java
+++ b/src/jogl/classes/jogamp/opengl/MemoryObject.java
@@ -43,13 +43,13 @@ public class MemoryObject {
private final long size;
private final int hash;
private ByteBuffer buffer=null;
- public MemoryObject(long addr, long size) {
+ public MemoryObject(final long addr, final long size) {
this.addr = addr;
this.size = size;
this.hash = HashUtil.getAddrSizeHash32_EqualDist(addr, size);
}
- public void setBuffer(ByteBuffer buffer) {
+ public void setBuffer(final ByteBuffer buffer) {
this.buffer = buffer;
}
@@ -76,7 +76,7 @@ public class MemoryObject {
* @return true of reference is equal or <code>obj</code> is of type <code>MemoryObject</code>
* and <code>addr</code> and <code>size</code> is equal.<br>
*/
- public boolean equals(Object obj) {
+ public boolean equals(final Object obj) {
if(this == obj) { return true; }
if(obj instanceof MemoryObject) {
final MemoryObject m = (MemoryObject) obj;
@@ -90,7 +90,7 @@ public class MemoryObject {
* @param obj0 the MemoryObject
* @return either the already mapped MemoryObject - not changing the map, or the newly mapped one.
*/
- public static MemoryObject getOrAddSafe(HashMap<MemoryObject,MemoryObject> map, MemoryObject obj0) {
+ public static MemoryObject getOrAddSafe(final HashMap<MemoryObject,MemoryObject> map, final MemoryObject obj0) {
final MemoryObject obj1 = map.get(obj0); // get identity (fast)
if(null == obj1) {
map.put(obj0, obj0);