public final class BinaryValuesInt extends Object
int
binary states in an unsigned-byte buffer.
By default, these states are 0
for off and 255
for on.
This class is immutable.
See BinaryValuesByte
for an equivalent class that stores these states as byte
Constructor and Description |
---|
BinaryValuesInt(int off,
int on) |
Modifier and Type | Method and Description |
---|---|
BinaryValuesByte |
asByte()
Derives a
BinaryValuesByte representation from the current values. |
BinaryValuesInt |
createInverted()
Inverts the values so off becomes on, and vice-versa.
|
boolean |
equals(Object o) |
static BinaryValuesInt |
getDefault()
Default values to use, if not otherwise specified.
|
int |
getOff()
The integer representation of the value for off.
|
int |
getOn()
The integer representation of the value for on.
|
int |
hashCode() |
public BinaryValuesByte asByte()
BinaryValuesByte
representation from the current values.
This is a similar structure but holds byte values rather than unsigned int values.
BinaryValuesByte
.public static BinaryValuesInt getDefault()
BinaryValuesInt
with default values (see class
description).public BinaryValuesInt createInverted()
This is an immutable operation.
BinaryValuesInt
with the off and on values switched.public int getOff()
public int getOn()
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.