|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jena.atlas.lib.BitsLong
public final class BitsLong
Utilities for manipulating a bit pattern which are held in a 64 bit long
(java.util.BitSet does not allow getting the pattern as a long)| Method Summary | |
|---|---|
static long |
access(long bits,
int start,
int finish)
Get the bits from start (inclusive) to finish (exclusive), leaving them aligned in the long. |
static long |
clear(long bits,
int start,
int finish)
Clear the bits specified. |
static boolean |
isSet(long bits,
int bitIndex)
Test whether a bit is set |
static long |
mask(int start,
int finish)
Create a mask that has ones between bit positions start (inc) and finish (exc), and zeros elsewhere. |
static long |
maskZero(int start,
int finish)
Create a mask that has zeros between bit positions start (inc) and finish (exc), and ones elsewhere |
static long |
pack(long bits,
long value,
int start,
int finish)
Place the value into the bit pattern between start and finish and returns the new value. |
static long |
set(long bits,
int bitIndex)
Set the bits specificied. |
static long |
set(long bits,
int start,
int finish)
Set the bits from string (inc) to finish (exc) to one |
static boolean |
test(long bits,
boolean isSet,
int bitIndex)
Test whether a bit is the same as isSet |
static boolean |
test(long bits,
long value,
int start,
int finish)
Test whether a range has a specific value or not |
static long |
unpack(long bits,
int start,
int finish)
Extract the value packed into bits start (inclusive) and finish (exclusive), the value is returned the low part of the returned long. |
static long |
unpack(String str,
int startChar,
int finishChar)
Get bits from a hex string. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static final long unpack(long bits,
int start,
int finish)
bits - start - finish -
public static final long pack(long bits,
long value,
int start,
int finish)
bits - value - start - finish -
public static final long unpack(String str,
int startChar,
int finishChar)
str - startChar - Index of first character (counted from the left, string style).finishChar - Index after the last character (counted from the left, string style).
public static final long set(long bits,
int bitIndex)
bits - PatternbitIndex -
public static final long set(long bits,
int start,
int finish)
bits - Patternstart - start (inclusive)finish - finish (exclusive)
public static final boolean test(long bits,
boolean isSet,
int bitIndex)
bits - PatternisSet - Test whether is set or not.bitIndex - Bit index
public static final boolean isSet(long bits,
int bitIndex)
bits - PatternbitIndex - Bit index
public static final boolean test(long bits,
long value,
int start,
int finish)
bits - Patternvalue - Value to test forstart - start (inclusive)finish - finish (exclusive)
public static final long access(long bits,
int start,
int finish)
bits - start - finish -
unpack(long, int, int)
public static final long clear(long bits,
int start,
int finish)
bits - start - finish -
public static final long mask(int start,
int finish)
start - finish -
public static final long maskZero(int start,
int finish)
start - finish -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||