From 791a2749886f02ec7b8db25bf8862e8269b96da5 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Thu, 17 Oct 2013 21:06:56 -0700 Subject: gluegen: remove trailing whitespace Signed-off-by: Harvey Harrison --- src/java/com/jogamp/common/util/IntBitfield.java | 42 ++++++++++++------------ 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'src/java/com/jogamp/common/util/IntBitfield.java') diff --git a/src/java/com/jogamp/common/util/IntBitfield.java b/src/java/com/jogamp/common/util/IntBitfield.java index ad27dff..07b24dc 100644 --- a/src/java/com/jogamp/common/util/IntBitfield.java +++ b/src/java/com/jogamp/common/util/IntBitfield.java @@ -29,24 +29,24 @@ package com.jogamp.common.util; /** * Simple bitfield holder class using an int[] storage. - *

+ *

* IntBitfield allows convenient access of a wide field of transient bits using efficient storage in O(1). *

*

* It can be used e.g. to map key-codes to pressed-state etc. - *

+ *

*/ public class IntBitfield { /** Unit size in bits, here 32 bits for one int unit. */ public static final int UNIT_SIZE = 32; - + private static final long UNIT_SHIFT_L = 5L; private static final int UNIT_SHIFT_I = 5; - + private final int[] storage; private final long bitsCountL; private final int bitsCountI; - + /** * @param bitCount */ @@ -54,9 +54,9 @@ public class IntBitfield { final int units = (int) ( ( bitCount + 7L ) >> UNIT_SHIFT_L ); this.storage = new int[units]; this.bitsCountL = (long)units << UNIT_SHIFT_L ; - this.bitsCountI = bitsCountL > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int)bitsCountL; + this.bitsCountI = bitsCountL > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int)bitsCountL; } - + /** * @param bitCount */ @@ -66,7 +66,7 @@ public class IntBitfield { this.bitsCountI = units << UNIT_SHIFT_I; this.bitsCountL = bitsCountI; } - + private final void check(long bitnum) { if( 0 > bitnum || bitnum >= bitsCountL ) { throw new ArrayIndexOutOfBoundsException("Bitnum should be within [0.."+(bitsCountL-1)+"], but is "+bitnum); @@ -77,10 +77,10 @@ public class IntBitfield { throw new ArrayIndexOutOfBoundsException("Bitnum should be within [0.."+(bitsCountI-1)+"], but is "+bitnum); } } - + /** Return the capacity of this bit field, i.e. the number of bits stored int this field. */ public final long capacity() { return bitsCountL; } - + /** Return true if the bit at position bitnum is set, otherwise false. */ public final boolean get(long bitnum) { check(bitnum); @@ -88,7 +88,7 @@ public class IntBitfield { final int b = (int) ( bitnum - ( (long)u << UNIT_SHIFT_L ) ); return 0 != ( storage[u] & ( 1 << b ) ) ; } - + /** Return true if the bit at position bitnum is set, otherwise false. */ public final boolean get(int bitnum) { check(bitnum); @@ -96,12 +96,12 @@ public class IntBitfield { final int b = bitnum - ( u << UNIT_SHIFT_I ); return 0 != ( storage[u] & ( 1 << b ) ) ; } - - /** + + /** * Set or clear the bit at position bitnum according to bit - * and return the previous value. + * and return the previous value. */ - public final boolean put(long bitnum, boolean bit) { + public final boolean put(long bitnum, boolean bit) { check(bitnum); final int u = (int) ( bitnum >> UNIT_SHIFT_L ); final int b = (int) ( bitnum - ( (long)u << UNIT_SHIFT_L ) ); @@ -116,12 +116,12 @@ public class IntBitfield { } return prev; } - - /** + + /** * Set or clear the bit at position bitnum according to bit - * and return the previous value. + * and return the previous value. */ - public final boolean put(int bitnum, boolean bit) { + public final boolean put(int bitnum, boolean bit) { check(bitnum); final int u = bitnum >> UNIT_SHIFT_I; final int b = bitnum - ( u << UNIT_SHIFT_I ); @@ -151,8 +151,8 @@ public class IntBitfield { c -= (n >> 2) & 011111111111; return ( (c + ( c >> 3 ) ) & 030707070707 ) % 63; } - - /** + + /** * Returns the number of set bits within this bitfield. */ public long getBitCount() { -- cgit v1.2.3