|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.tudelft.simulation.language.util.BitUtil
public final class BitUtil
Utilities for the bitset class.
(c) copyright 2002-2005 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl/language
License of use: Lesser
General Public License (LGPL) , no warranty
Method Summary | |
---|---|
static BitSet |
fromBoolean(boolean value)
returns a one-size BitSet with value |
static BitSet |
fromByteArray(byte[] bytes)
|
static BitSet |
fromInt(int value,
int length)
returns the bitset of an integer value |
static BitSet |
fromInteger(Integer value,
int length)
returns the bitset of an integer value |
static BitSet |
fromString(String value)
constructs a new BitSet from a string in the "110110" format. |
static byte[] |
toByteArray(BitSet bits)
|
static int |
toInt(BitSet bits,
int length)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static byte[] toByteArray(BitSet bits)
bits
- the bitset to convert
public static int toInt(BitSet bits, int length)
bits
- the bitset to convertlength
- the length of the set
public static BitSet fromString(String value)
value
- the value
public static BitSet fromByteArray(byte[] bytes)
bytes
- the byteArray
public static BitSet fromInt(int value, int length)
value
- the valuelength
- the length of the bitSet to produce
public static BitSet fromInteger(Integer value, int length)
value
- the valuelength
- the length of
public static BitSet fromBoolean(boolean value)
value
- the value of the bitSet
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |