public class Bit extends Number
Modifier and Type | Field and Description |
---|---|
private boolean |
bit
Internal representation of the bit value.
|
static Pattern |
BIT_PATTERN
Pattern defining valid bit values.
|
static Bit |
FALSE
False bit.
|
private static long |
serialVersionUID
Generated serial version UID.
|
static Bit |
TRUE
True bit.
|
Constructor and Description |
---|
Bit(boolean bit)
Deprecated.
Use
valueOf(java.lang.String) to save memory. |
Bit(int bit)
Deprecated.
Use
valueOf(java.lang.String) to save memory. |
Modifier and Type | Method and Description |
---|---|
boolean |
bitValue()
Returns the bit value as a boolean.
|
double |
doubleValue() |
float |
floatValue() |
int |
intValue() |
long |
longValue() |
String |
toString() |
static Bit |
valueOf(boolean b)
Convert truth value to a bit.
|
static Bit |
valueOf(String bit)
Method to construct a Bit for a given String expression.
|
byteValue, shortValue
private static final long serialVersionUID
public static final Pattern BIT_PATTERN
public static final Bit TRUE
public static final Bit FALSE
private boolean bit
@Deprecated public Bit(boolean bit)
valueOf(java.lang.String)
to save memory.bit
- the boolean value of this bit@Deprecated public Bit(int bit) throws IllegalArgumentException
valueOf(java.lang.String)
to save memory.bit
- 1 for true and 0 for falseIllegalArgumentException
- if the specified value is neither 0 nor 1.public static Bit valueOf(String bit) throws NumberFormatException
bit
- a String expression defining a BitNumberFormatException
- if the given String expression does not fit
the defined pattern.public static Bit valueOf(boolean b)
b
- Truth valuepublic float floatValue()
floatValue
in class Number
public double doubleValue()
doubleValue
in class Number
public boolean bitValue()
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.