this.symbol = symbol;
}
+ public boolean isBinary()
+ {
+ return this == ONE || this == ZERO;
+ }
+
@Override
public Bit and(Bit other)
{
return values()[2 + (value & 1)];
}
+ public static Bit of(boolean binaryValue)
+ {
+ return binaryValue ? ONE : ZERO;
+ }
+
public static Bit parse(String s)
{
Bit bit = SYMBOL_MAP.get(s);