@Override public boolean isNullable() { return wrapped.isNullable(); }
@Override public boolean isNullable() { return typeA.isNullable() && typeB.isNullable(); }
@Override public boolean isNullable() { return base.isNullable(); }
@Override public boolean isNullable() { return super.isNullable() && typeC.isNullable(); }
@Override public boolean isNullable() { return super.isNullable() && typeD.isNullable(); }
@SuppressWarnings("unchecked") @Override public int encode(PositionedByteRange dst, Object[] val) { if (val.length == 0) { return 0; } assert fields.length >= val.length; int end, written = 0; // find the last occurrence of a non-null or null and non-nullable value for (end = val.length - 1; end > -1; end--) { if (null != val[end] || (null == val[end] && !fields[end].isNullable())) { break; } } for (int i = 0; i <= end; i++) { written += fields[i].encode(dst, val[i]); } return written; } }
@Override public Object next() { if (!hasNext()) { throw new NoSuchElementException(); } DataType<?> t = types[idx++]; if (src.getPosition() == src.getLength() && t.isNullable()) { return null; } return t.decode(src); }
/** * Bypass the next encoded value. * @return the number of bytes skipped. */ public int skip() { if (!hasNext()) { throw new NoSuchElementException(); } DataType<?> t = types[idx++]; if (src.getPosition() == src.getLength() && t.isNullable()) { return 0; } return t.skip(src); } }
@Override public boolean isNullable() { return wrapped.isNullable(); }
@Override public boolean isNullable() { return typeA.isNullable() && typeB.isNullable(); }
@Override public boolean isNullable() { return typeA.isNullable() && typeB.isNullable(); }
@Override public boolean isNullable() { return base.isNullable(); }
@Override public boolean isNullable() { return super.isNullable() && typeD.isNullable(); }
@Override public boolean isNullable() { return super.isNullable() && typeC.isNullable(); }
@Override public boolean isNullable() { return super.isNullable() && typeC.isNullable(); }
@Override public boolean isNullable() { return super.isNullable() && typeD.isNullable(); }
@Override public boolean isNullable() { return super.isNullable() && typeC.isNullable(); }
@Override public Object next() { if (!hasNext()) { throw new NoSuchElementException(); } DataType<?> t = types[idx++]; if (src.getPosition() == src.getLength() && t.isNullable()) { return null; } return t.decode(src); }
@Override public Object next() { if (!hasNext()) throw new NoSuchElementException(); DataType<?> t = types[idx++]; if (src.getPosition() == src.getLength() && t.isNullable()) return null; return t.decode(src); }
@Override public Object next() { if (!hasNext()) { throw new NoSuchElementException(); } DataType<?> t = types[idx++]; if (src.getPosition() == src.getLength() && t.isNullable()) { return null; } return t.decode(src); }