@Override public int compareTo(byte[] bytes, int start, int length) { boolean b = getBoolean(); boolean ob = getBoolean(bytes, start); return b == ob ? 0 : (b ? 1 : -1); }
@Override public int hash(byte[] bytes, int offset, int length) { boolean v = BooleanPointable.getBoolean(bytes, offset); return v ? 1 : 0; } };
public static boolean getBoolean(byte[] bytes, int offset) { return BooleanPointable.getBoolean(bytes, offset); } }
public boolean getBoolean() { return getBoolean(bytes, start); }
@Override public void convertBoolean(BooleanPointable boolp, DataOutput dOut) throws SystemException, IOException { dOut.write(returnTag); dOut.writeInt((int) (boolp.getBoolean() ? 1 : 0)); }
@Override public void convertBoolean(BooleanPointable boolp, DataOutput dOut) throws SystemException, IOException { dOut.write(returnTag); dOut.writeShort((short) (boolp.getBoolean() ? 1 : 0)); }
@Override public void convertBoolean(BooleanPointable boolp, DataOutput dOut) throws SystemException, IOException { dOut.write(returnTag); dOut.writeLong((long) (boolp.getBoolean() ? 1 : 0)); }
@Override public int hash() { return getBoolean() ? Boolean.TRUE.hashCode() : Boolean.FALSE.hashCode(); } }
@Override public void convertBoolean(BooleanPointable boolp, DataOutput dOut) throws SystemException, IOException { double value = (boolp.getBoolean() ? 1 : 0); dOut.write(ValueTag.XS_DOUBLE_TAG); dOut.writeDouble(value); }
@Override public void convertBoolean(BooleanPointable boolp, DataOutput dOut) throws SystemException, IOException { float value = (boolp.getBoolean() ? 1 : 0); dOut.write(ValueTag.XS_FLOAT_TAG); dOut.writeFloat(value); }
@Override public void convertBoolean(BooleanPointable boolp, DataOutput dOut) throws SystemException, IOException { dOut.write(returnTag); dOut.write((byte) (boolp.getBoolean() ? 1 : 0)); }
@Override public void convertBoolean(BooleanPointable boolp, DataOutput dOut) throws SystemException, IOException { long value = (boolp.getBoolean() ? 1 : 0); dOut.write(ValueTag.XS_DECIMAL_TAG); dOut.writeByte(0); dOut.writeLong(value); }
public boolean isExpanded(ARecordType recordType) { if (isOpen(recordType)) { return BooleanPointable.getBoolean(bytes, getExpandedOffset(recordType)); } return false; }
protected boolean isAntiMatterTuple(ITupleReference tuple) { return BooleanPointable.getBoolean(tuple.getFieldData(1), tuple.getFieldStart(1)); }
private void printBoolean(PrintStream ps, TaggedValuePointable tvp) { BooleanPointable bp = pp.takeOne(BooleanPointable.class); try { tvp.getValue(bp); ps.print(bp.getBoolean()); } finally { pp.giveBack(bp); } }
@Override protected void evaluate(TaggedValuePointable[] args, IPointable result) throws SystemException { TaggedValuePointable arg = args[0]; arg.getValue(bp); if (bp.getBoolean()) { XDMConstants.setFalse(result); } else { XDMConstants.setTrue(result); } } };
@Override public boolean getBooleanValue(byte[] bytes, int offset, int length) { tvp.set(bytes, offset, length); assert tvp.getTag() == ValueTag.XS_BOOLEAN_TAG; tvp.getValue(bp); return bp.getBoolean(); } };
@Override public void convertBoolean(BooleanPointable boolp, DataOutput dOut) throws SystemException, IOException { abvsInner.reset(); if (boolp.getBoolean()) { FunctionHelper.writeCharSequence("true", dOutInner); } else { FunctionHelper.writeCharSequence("false", dOutInner); } sendStringDataOutput(dOut); }
@Override public final void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException { for (int i = 0; i < args.length; ++i) { args[i].evaluate(tuple, tvp); tvp.getValue(bp); if (!bp.getBoolean()) { XDMConstants.setFalse(result); return; } } XDMConstants.setTrue(result); } }
@Override public final void evaluate(IFrameTupleReference tuple, IPointable result) throws AlgebricksException { for (int i = 0; i < args.length; ++i) { args[i].evaluate(tuple, tvp); tvp.getValue(bp); if (bp.getBoolean()) { XDMConstants.setTrue(result); return; } } XDMConstants.setFalse(result); } }