/** * Get the element at the specified position. * * @param index position of the value * @return value of the element, if not null * @throws IllegalStateException if the value is null */ public byte[] get(int index) { if (isNull(index)) { throw new IllegalStateException("Can't get a null value"); } return vAccessor.get(index); }
@Override public String getString(int index) { if (ac.isNull(index)) { return null; } return new String(getBytes(index), Charsets.UTF_16); }
/** * Get the element at the specified position. * * @param index position of the value * @return value of the element, if not null * @throws IllegalStateException if the value is null */ public byte[] get(int index) { if (isNull(index)) { throw new IllegalStateException("Can't get a null value"); } return vAccessor.get(index); }
public boolean isSet() { return !vector.getAccessor().isNull(idx()); }
@Override public boolean isNull(int index) { return ac.isNull(index); }
@Override public String getObject(int index) { if (isNull(index)) { return null; } else { return vAccessor.getObject(index); } }
public void copyFrom(int fromIndex, int thisIndex, NullableVar16CharVector from){ final Accessor fromAccessor = from.getAccessor(); if (!fromAccessor.isNull(fromIndex)) { mutator.set(thisIndex, fromAccessor.get(fromIndex)); } }
@Override public Object getObject(int index) { if (ac.isNull(index)) { return null; } return ac.getObject(index); }
@Override public InputStreamReader getReader(int index) { if (ac.isNull(index)) { return null; } return new InputStreamReader(getStream(index), Charsets.UTF_16); }
@Override public InputStream getStream(int index) { if (ac.isNull(index)) { return null; } NullableVar16CharHolder h = new NullableVar16CharHolder(); ac.get(index, h); return new ByteBufInputStream(h.buffer.slice(h.start, h.end)); }
@Override public byte[] getBytes(int index) { if (ac.isNull(index)) { return null; } return ac.get(index); }
public boolean isSet() { return !vector.getAccessor().isNull(idx()); }
public void copyFrom(int fromIndex, int thisIndex, NullableVar16CharVector from){ final Accessor fromAccessor = from.getAccessor(); if (!fromAccessor.isNull(fromIndex)) { mutator.set(thisIndex, fromAccessor.get(fromIndex)); } }
@Override public String getObject(int index) { if (isNull(index)) { return null; } else { return vAccessor.getObject(index); } }