|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.panter.li.bi.util.FlagTool
public final class FlagTool
Simplifies bit operations and makes them more readable. TODO: rewrite to own class
Constructor Summary | |
---|---|
FlagTool()
|
Method Summary | |
---|---|
static byte |
clear(byte pnFlagList,
byte pnFlagToClear)
Sets some specified bits in a flag list to '0'. |
static char |
clear(char pnFlagList,
char pnFlagToClear)
Sets some specified bits in a flag list to '0'. |
static int |
clear(int pnFlagList,
int pnFlagToClear)
Sets some specified bits in a flag list to '0'. |
static long |
clear(long pnFlagList,
long pnFlagToClear)
Sets some specified bits in a flag list to '0'. |
static short |
clear(short pnFlagList,
short pnFlagToClear)
Sets some specified bits in a flag list to '0'. |
static boolean |
isSet(byte pnFlagList,
byte pnFlagToTest)
Tests whether some bits in a flag list are set to '1'. |
static boolean |
isSet(char pnFlagList,
char pnFlagToTest)
Tests whether some bits in a flag list are set to '1'. |
static boolean |
isSet(int pnFlagList,
int pnFlagToTest)
Tests whether some bits in a flag list are set to '1'. |
static boolean |
isSet(long pnFlagList,
long pnFlagToTest)
Tests whether some bits in a flag list are set to '1'. |
static boolean |
isSet(short pnFlagList,
short pnFlagToTest)
Tests whether some bits in a flag list are set to '1'. |
static byte |
set(byte pnFlagList,
byte pnFlagToSet)
Sets some specified bits in a flag list to '1'. |
static byte |
set(byte pnFlagList,
byte pnFlagToSet,
boolean pbSet)
Sets some specified bits in a flag list to '1' or '0' depending on the given boolean parameter. |
static char |
set(char pnFlagList,
char pnFlagToSet)
Sets some specified bits in a flag list to '1'. |
static char |
set(char pnFlagList,
char pnFlagToSet,
boolean pbSet)
Sets some specified bits in a flag list to '1' or '0' depending on the given boolean parameter. |
static int |
set(int pnFlagList,
int pnFlagToSet)
Sets some specified bits in a flag list to '1'. |
static int |
set(int pnFlagList,
int pnFlagToSet,
boolean pbSet)
Sets some specified bits in a flag list to '1' or '0' depending on the given boolean parameter. |
static long |
set(long pnFlagList,
long pnFlagToSet)
Sets some specified bits in a flag list to '1'. |
static long |
set(long pnFlagList,
long pnFlagToSet,
boolean pbSet)
Sets some specified bits in a flag list to '1' or '0' depending on the given boolean parameter. |
static short |
set(short pnFlagList,
short pnFlagToSet)
Sets some specified bits in a flag list to '1'. |
static short |
set(short pnFlagList,
short pnFlagToSet,
boolean pbSet)
Sets some specified bits in a flag list to '1' or '0' depending on the given boolean parameter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FlagTool()
Method Detail |
---|
public static byte set(byte pnFlagList, byte pnFlagToSet)
pnFlagList
- the list of flags to 'modify'pnFlagToSet
- the flags to set to '1'
public static byte set(byte pnFlagList, byte pnFlagToSet, boolean pbSet)
pnFlagList
- the list of flags to 'modify'pnFlagToSet
- the flags to set to the desired statepbSet
- the state to set the flags to: true means '1', false means '0'
public static byte clear(byte pnFlagList, byte pnFlagToClear)
pnFlagList
- the list of flags to 'modify'pnFlagToClear
- the flags to set to '0'
public static boolean isSet(byte pnFlagList, byte pnFlagToTest)
pnFlagList
- the list of flags to testpnFlagToTest
- the flags to check for state '1'
public static short set(short pnFlagList, short pnFlagToSet)
pnFlagList
- the list of flags to 'modify'pnFlagToSet
- the flags to set to '1'
public static short set(short pnFlagList, short pnFlagToSet, boolean pbSet)
pnFlagList
- the list of flags to 'modify'pnFlagToSet
- the flags to set to the desired statepbSet
- the state to set the flags to: true means '1', false means '0'
public static short clear(short pnFlagList, short pnFlagToClear)
pnFlagList
- the list of flags to 'modify'pnFlagToClear
- the flags to set to '0'
public static boolean isSet(short pnFlagList, short pnFlagToTest)
pnFlagList
- the list of flags to testpnFlagToTest
- the flags to check for state '1'
public static char set(char pnFlagList, char pnFlagToSet)
pnFlagList
- the list of flags to 'modify'pnFlagToSet
- the flags to set to '1'
public static char set(char pnFlagList, char pnFlagToSet, boolean pbSet)
pnFlagList
- the list of flags to 'modify'pnFlagToSet
- the flags to set to the desired statepbSet
- the state to set the flags to: true means '1', false means '0'
public static char clear(char pnFlagList, char pnFlagToClear)
pnFlagList
- the list of flags to 'modify'pnFlagToClear
- the flags to set to '0'
public static boolean isSet(char pnFlagList, char pnFlagToTest)
pnFlagList
- the list of flags to testpnFlagToTest
- the flags to check for state '1'
public static int set(int pnFlagList, int pnFlagToSet)
pnFlagList
- the list of flags to 'modify'pnFlagToSet
- the flags to set to '1'
public static int set(int pnFlagList, int pnFlagToSet, boolean pbSet)
pnFlagList
- the list of flags to 'modify'pnFlagToSet
- the flags to set to the desired statepbSet
- the state to set the flags to: true means '1', false means '0'
public static int clear(int pnFlagList, int pnFlagToClear)
pnFlagList
- the list of flags to 'modify'pnFlagToClear
- the flags to set to '0'
public static boolean isSet(int pnFlagList, int pnFlagToTest)
pnFlagList
- the list of flags to testpnFlagToTest
- the flags to check for state '1'
public static long set(long pnFlagList, long pnFlagToSet)
pnFlagList
- the list of flags to 'modify'pnFlagToSet
- the flags to set to '1'
public static long set(long pnFlagList, long pnFlagToSet, boolean pbSet)
pnFlagList
- the list of flags to 'modify'pnFlagToSet
- the flags to set to the desired statepbSet
- the state to set the flags to: true means '1', false means '0'
public static long clear(long pnFlagList, long pnFlagToClear)
pnFlagList
- the list of flags to 'modify'pnFlagToClear
- the flags to set to '0'
public static boolean isSet(long pnFlagList, long pnFlagToTest)
pnFlagList
- the list of flags to testpnFlagToTest
- the flags to check for state '1'
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |