public void eval() { if (left.isSet == 0 || right.isSet == 0) { out.value = 0; } else { out.value = (left.value != right.value) ? 1 : 0; } }
private void writeBoolean( boolean readBoolean, final MapOrListWriterImpl writer, String fieldName, boolean isList) { final BitHolder bit = new BitHolder(); bit.value = readBoolean ? 1 : 0; if (isList == false) { writer.bit(fieldName).write(bit); } else { writer.list.bit().write(bit); } }
@Override public void addBoolean(boolean value) { holder.value = value ? 1 : 0; writer.write(holder); }
public static BitHolder getBitHolder(int value) { BitHolder holder = new BitHolder(); holder.value = value; return holder; }