Uses of Class
Bit
-
-
Uses of Bit in <Unnamed>
Fields in <Unnamed> declared as Bit Modifier and Type Field Description static Bit
Bit. ONE
The bit 1.static Bit
Bit. ZERO
The bit 0.Methods in <Unnamed> that return Bit Modifier and Type Method Description Bit
Bit. and(Bit other)
Sets this bit to the logical AND of this bit and the other bit.Bit
Binary. getLeftMostBit()
Returns the left-most bit of this binary number.Bit
Binary. getRightMostBit()
Returns the right-most bit of this binary number.Bit
Bit. not()
Sets the value of this bit to 0 if the current value of this bit is 1, or sets the value of this bit to 1 if the current value of this bit is 0.Bit
Bit. or(Bit other)
Sets this bit to the logical OR of this bit and the other bit.Bit
Bit. set(boolean bit)
Sets this bit to 1 ifbit
is true, 0 otherwise.Bit
Bit. set(int bit)
Sets this bit the specified value.Methods in <Unnamed> that return types with arguments of type Bit Modifier and Type Method Description List<Bit>
Binary. getBits()
Returns a reference to the list of bits; for testing purposes only.Methods in <Unnamed> with parameters of type Bit Modifier and Type Method Description Bit
Bit. and(Bit other)
Sets this bit to the logical AND of this bit and the other bit.int
Bit. compareTo(Bit other)
Compares this bit to another bit for order.Bit
Bit. or(Bit other)
Sets this bit to the logical OR of this bit and the other bit.void
Binary. setBit(int index, Bit bit)
Sets a bit at the given index by copying the value ofbit
into the bit at the given index.Method parameters in <Unnamed> with type arguments of type Bit Modifier and Type Method Description (package private) static int
Binary. toDecimalHelper(List<Bit> bits)
Recursively computes the decimal value of a binary number represented as a list of bits.Constructors in <Unnamed> with parameters of type Bit Constructor Description Bit(Bit other)
Initialize this bit by copying another bit.Constructor parameters in <Unnamed> with type arguments of type Bit Constructor Description Binary(List<Bit> bits)
Initializes this binary number to have the specified bits.
-