|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.ranides.assira.math.Bitwise
public final class Bitwise
Klasa pomocnicza realizująca częste operacje bitowe.
| Method Summary | |
|---|---|
static int |
and(int... values)
Oblicza koniunkcję logiczną (and) wszystkich podanych wartości. |
static long |
and(long... values)
Oblicza koniunkcję logiczną (and) wszystkich podanych wartości. |
static boolean |
at(int value,
int index)
Sprawdza, czy w zmiennej value jest ustawiony bit o numerze
index. |
static boolean |
at(long value,
int index)
Sprawdza, czy w zmiennej value jest ustawiony bit o numerze
index. |
static boolean |
has(int value,
int mask)
Sprawdza, czy wartość value ma ustawione wszystkie bity podane
w masce mask. |
static boolean |
has(long value,
long mask)
Sprawdza, czy wartość value ma ustawione wszystkie bity podane
w masce mask. |
static boolean |
match(int value,
int mask)
Sprawdza, czy wartość value ma ustawione wszystkie bity podane
w masce mask, lub na odwrót: czy mask ma ustawione bity
value. |
static boolean |
match(long value,
long mask)
Sprawdza, czy wartość value ma ustawione wszystkie bity podane
w masce mask, lub na odwrót: czy mask ma ustawione bity
value. |
static int |
or(int... values)
Oblicza sumę logiczną (or) wszystkich podanych wartości. |
static long |
or(long... values)
Oblicza sumę logiczną (or) wszystkich podanych wartości. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean match(int value,
int mask)
value ma ustawione wszystkie bity podane
w masce mask, lub na odwrót: czy mask ma ustawione bity
value.
value - mask -
public static boolean match(long value,
long mask)
value ma ustawione wszystkie bity podane
w masce mask, lub na odwrót: czy mask ma ustawione bity
value.
value - mask -
public static boolean has(int value,
int mask)
value ma ustawione wszystkie bity podane
w masce mask. Bity, które nie są ustawione w masce, mogą mieć
dowolną wartość.
value - mask -
public static boolean has(long value,
long mask)
value ma ustawione wszystkie bity podane
w masce mask. Bity, które nie są ustawione w masce, mogą mieć
dowolną wartość.
value - mask -
public static boolean at(int value,
int index)
value jest ustawiony bit o numerze
index. Bity są indeksowane o zera.
value - index -
public static boolean at(long value,
int index)
value jest ustawiony bit o numerze
index. Bity są indeksowane o zera.
value - index -
public static int or(int... values)
values -
public static long or(long... values)
values -
public static int and(int... values)
values -
public static long and(long... values)
values -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||