diff options
author | Harvey Harrison <[email protected]> | 2013-10-17 21:06:56 -0700 |
---|---|---|
committer | Harvey Harrison <[email protected]> | 2013-10-17 21:06:56 -0700 |
commit | 791a2749886f02ec7b8db25bf8862e8269b96da5 (patch) | |
tree | c9be31d0bbbe8033b4a6a0cfad91a22b6575ced1 /src/java/com/jogamp/common/util/IntBitfield.java | |
parent | 5b77e15500b7b19d35976603dd71e8b997b2d8ea (diff) |
gluegen: remove trailing whitespace
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src/java/com/jogamp/common/util/IntBitfield.java')
-rw-r--r-- | src/java/com/jogamp/common/util/IntBitfield.java | 42 |
1 files changed, 21 insertions, 21 deletions
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. - * <p> + * <p> * IntBitfield allows convenient access of a wide field of transient bits using efficient storage in O(1). * </p> * <p> * It can be used e.g. to map key-codes to pressed-state etc. - * </p> + * </p> */ 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 <code>true</code> if the bit at position <code>bitnum</code> is set, otherwise <code>false</code>. */ 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 <code>true</code> if the bit at position <code>bitnum</code> is set, otherwise <code>false</code>. */ 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 <code>bitnum</code> according to <code>bit</code> - * 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 <code>bitnum</code> according to <code>bit</code> - * 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() { |