/** * 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 int get(int index) { if (isNull(index)) { throw new IllegalStateException("Can't get a null value"); } return vAccessor.get(index); }
@Override public Object readObject() { List<Object> valList = Lists.newArrayList(); for (int i = repeatedHolder.start; i < repeatedHolder.end; i++) { valList.add(repeatedHolder.vector.getAccessor().getObject(i)); } return valList; }
public void read(Decimal9Holder h) { vector.getAccessor().get(idx(), h); }
public BigDecimal getSingleObject(int index, int arrayIndex) { final int start = offsets.getAccessor().get(index); return values.getAccessor().getObject(start + arrayIndex); }
/** * 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 int get(int index) { if (isNull(index)) { throw new IllegalStateException("Can't get a null value"); } return vAccessor.get(index); }
@Override public BigDecimal getBigDecimal(int index) { return ac.getObject(index); }
@Override public void generateTestData(int size) { setValueCount(size); boolean even = true; final int valueCount = getAccessor().getValueCount(); for(int i = 0; i < valueCount; i++, even = !even) { if(even) { set(i, Integer.MIN_VALUE); } else { set(i, Integer.MAX_VALUE); } } }
@Override public Object getObject(int index) { return ac.getObject(index); }
public BigDecimal readBigDecimal() { return vector.getAccessor().getObject(idx()); }
public void getFieldById(int fieldId, Decimal9Holder holder){ ((Decimal9Vector) vectors[fieldId]).getAccessor().get(currentIndex, holder); }
public void read(NullableDecimal9Holder h) { vector.getAccessor().get(idx(), h); }
public Object readObject() { return vector.getAccessor().getObject(idx()); }
@Override public Object readObject() { List<Object> valList = Lists.newArrayList(); for (int i = repeatedHolder.start; i < repeatedHolder.end; i++) { valList.add(repeatedHolder.vector.getAccessor().getObject(i)); } return valList; }
public void get(int index, int positionIndex, Decimal9Holder holder) { final int offset = offsets.getAccessor().get(index); assert offset >= 0; assert positionIndex < getInnerValueCountAt(index); values.getAccessor().get(offset + positionIndex, holder); }
@Override public BigDecimal getObject(int index) { if (isNull(index)) { return null; } else { return vAccessor.getObject(index); } }
public void add(int index, RepeatedDecimal9Holder holder) { final Decimal9Vector.Accessor accessor = holder.vector.getAccessor(); final Decimal9Holder innerHolder = new Decimal9Holder(); for(int i = holder.start; i < holder.end; i++) { accessor.get(i, innerHolder); add(index, innerHolder); } }
public void setSafe(int index, RepeatedDecimal9Holder h) { final Decimal9Holder ih = new Decimal9Holder(); final Decimal9Vector.Accessor hVectorAccessor = h.vector.getAccessor(); mutator.startNewValue(index); for(int i = h.start; i < h.end; i++){ hVectorAccessor.get(i, ih); mutator.addSafe(index, ih); } }
/** * Get a value for the given record. Each element in the repeated field is accessed by * the positionIndex param. * * @param index record containing the repeated field * @param positionIndex position within the repeated field * @return element at the given position in the given record */ public int get(int index, int positionIndex) { return values.getAccessor().get(offsets.getAccessor().get(index) + positionIndex); }
public void get(int index, NullableDecimal9Holder holder){ vAccessor.get(index, holder); holder.isSet = bAccessor.get(index); holder.scale = getField().getScale(); holder.precision = getField().getPrecision(); }