Package com.jogamp.common.util
Class IntBitfield
java.lang.Object
com.jogamp.common.util.IntBitfield
Deprecated.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDeprecated.Unit size in bits, here 32 bits for one int unit. -
Constructor Summary
ConstructorsConstructorDescriptionIntBitfield(int bitCount) Deprecated.IntBitfield(long bitCount) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionfinal longcapacity()Deprecated.Return the capacity of this bit field, i.e.final booleanget(int bitnum) Deprecated.Returntrueif the bit at positionbitnumis set, otherwisefalse.final booleanget(long bitnum) Deprecated.Returntrueif the bit at positionbitnumis set, otherwisefalse.longDeprecated.Returns the number of set bits within this bitfield.static final intgetBitCount(int n) Deprecated.final booleanput(int bitnum, boolean bit) Deprecated.Set or clear the bit at positionbitnumaccording tobitand return the previous value.final booleanput(long bitnum, boolean bit) Deprecated.Set or clear the bit at positionbitnumaccording tobitand return the previous value.
-
Field Details
-
UNIT_SIZE
public static final int UNIT_SIZEDeprecated.Unit size in bits, here 32 bits for one int unit.- See Also:
-
-
Constructor Details
-
IntBitfield
public IntBitfield(long bitCount) Deprecated.- Parameters:
bitCount-
-
IntBitfield
public IntBitfield(int bitCount) Deprecated.- Parameters:
bitCount-
-
-
Method Details
-
capacity
public final long capacity()Deprecated.Return the capacity of this bit field, i.e. the number of bits stored int this field. -
get
public final boolean get(long bitnum) Deprecated.Returntrueif the bit at positionbitnumis set, otherwisefalse. -
get
public final boolean get(int bitnum) Deprecated.Returntrueif the bit at positionbitnumis set, otherwisefalse. -
put
public final boolean put(long bitnum, boolean bit) Deprecated.Set or clear the bit at positionbitnumaccording tobitand return the previous value. -
put
public final boolean put(int bitnum, boolean bit) Deprecated.Set or clear the bit at positionbitnumaccording tobitand return the previous value. -
getBitCount
public static final int getBitCount(int n) Deprecated. -
getBitCount
public long getBitCount()Deprecated.Returns the number of set bits within this bitfield.Utilizes {#link
getBitCount(int)}.
-
Bitfieldimplementations viaBitfield.Factory.create(int).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.