public void add(int fieldIndex, Binary value) { switch (this.getType().getType(fieldIndex).asPrimitiveType().getPrimitiveTypeName()) { case BINARY: this.add(fieldIndex, new BinaryValue(value)); break; case INT96: this.add(fieldIndex, new Int96Value(value)); break; default: throw new UnsupportedOperationException( this.getType().asPrimitiveType().getName() + " not supported for Binary"); } }
public Binary getInt96(int fieldIndex, int index) { return ((Int96Value) this.getValue(fieldIndex, index)).getInt96(); }
public Int96Value toInt96() { return new Int96Value(toBinary()); }
@Override public Binary getInt96(int fieldIndex, int index) { return ((Int96Value)getValue(fieldIndex, index)).getInt96(); }
public void add(int fieldIndex, Binary value) { switch (this.getType().getType(fieldIndex).asPrimitiveType().getPrimitiveTypeName()) { case BINARY: this.add(fieldIndex, new BinaryValue(value)); break; case INT96: this.add(fieldIndex, new Int96Value(value)); break; default: throw new UnsupportedOperationException( this.getType().asPrimitiveType().getName() + " not supported for Binary"); } }
public Binary getInt96(int fieldIndex, int index) { return ((Int96Value) this.getValue(fieldIndex, index)).getInt96(); }
@Override public void add(int fieldIndex, Binary value) { switch (getType().getType(fieldIndex).asPrimitiveType().getPrimitiveTypeName()) { case BINARY: case FIXED_LEN_BYTE_ARRAY: add(fieldIndex, new BinaryValue(value)); break; case INT96: add(fieldIndex, new Int96Value(value)); break; default: throw new UnsupportedOperationException( getType().asPrimitiveType().getName() + " not supported for Binary"); } }
public static NanoTime fromInt96(Int96Value int96) { ByteBuffer buf = int96.getInt96().toByteBuffer(); return new NanoTime(buf.getInt(), buf.getLong()); }