public class Bit
extends java.lang.Number
Modifier and Type | Field and Description |
---|---|
private boolean |
bit
Internal representation of the bit value.
|
static java.util.regex.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() |
java.lang.String |
toString() |
static Bit |
valueOf(boolean b)
Convert truth value to a bit.
|
static Bit |
valueOf(java.lang.String bit)
Method to construct a Bit for a given String expression.
|
private static final long serialVersionUID
public static final java.util.regex.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 java.lang.IllegalArgumentException
valueOf(java.lang.String)
to save memory.bit
- 1 for true and 0 for falsejava.lang.IllegalArgumentException
- if the specified value is neither 0 nor 1.public static Bit valueOf(java.lang.String bit) throws java.lang.NumberFormatException
bit
- a String expression defining a Bitjava.lang.NumberFormatException
- if the given String expression does not fit
the defined pattern.public static Bit valueOf(boolean b)
b
- Truth valuepublic int intValue()
intValue
in class java.lang.Number
public long longValue()
longValue
in class java.lang.Number
public float floatValue()
floatValue
in class java.lang.Number
public double doubleValue()
doubleValue
in class java.lang.Number
public boolean bitValue()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2019 ELKI Development Team. License information.