public BooleanColumn append(byte b) { data.add(b); return this; }
@Override public void append(String value) throws NoKeysAvailableException { byte key; if (value == null || StringColumnType.missingValueIndicator().equals(value)) { key = MISSING_VALUE; put(key, StringColumnType.missingValueIndicator()); } else { key = getKeyForValue(value); } if (key == DEFAULT_RETURN_VALUE) { key = getValueId(); put(key, value); } values.add(key); }
@Override public void add(byte k) { ByteArrayList.this.add(pos++, k); last = -1; } @Override
@Override public void addByte(byte value) { list.add(value); } };
public BooleanColumn append(byte b) { data.add(b); return this; }
public void add(byte b) { data.add(b); }
/** Appends compressed value v to the given posting list. Set v=0 for a separator, * v=transactionId+1 for a transaction id, and v=position+1 for a position. */ public static final void addCompressed(int v, ByteArrayList postingList) { assert v >= 0; do { byte b = (byte) (v & 127); v >>= 7; if (v == 0) { postingList.add(b); break; } else { b += 128; postingList.add(b); } } while (true); }
/** * Creates a new array list and fills it with the elements returned by an * iterator.. * * @param i * an iterator whose returned elements will fill the array list. */ public ByteArrayList(final Iterator<? extends Byte> i) { this(); while (i.hasNext()) this.add((i.next()).byteValue()); } /**
/** * Creates a new array list and fills it with the elements returned by a * type-specific iterator.. * * @param i * a type-specific iterator whose returned elements will fill the * array list. */ public ByteArrayList(final ByteIterator i) { this(); while (i.hasNext()) this.add(i.nextByte()); } /**
if (wrapped == null) wrapped = new ByteArrayList(2); wrapped.add(key[pos]);
if (wrapped == null) wrapped = new ByteArrayList(2); wrapped.add(key[pos]);
if (wrapped == null) wrapped = new ByteArrayList(2); wrapped.add(key[pos]);
@Override public void append(String value) throws NoKeysAvailableException { byte key; if (value == null || StringColumnType.missingValueIndicator().equals(value)) { key = MISSING_VALUE; put(key, StringColumnType.missingValueIndicator()); } else { key = getKeyForValue(value); } if (key == DEFAULT_RETURN_VALUE) { key = getValueId(); put(key, value); } values.add(key); }
@Override public void setTag(String k, @Nullable NBTBase base) { int id = Integer.parseInt(k); if (id == -1) { if (base != null) { list.add(((NBTPrimitive) base).getByte()); } } else if (base != null) { list.set(id, ((NBTPrimitive) base).getByte()); } else { list.rem(id); } if (parent != null) { parent.setTag(key, new NBTTagByteArray(list.toByteArray())); } }
public BooleanColumn(String name, Selection hits, int columnSize) { super(name); if (columnSize == 0) { return; } ByteArrayList data = new ByteArrayList(columnSize); for (int i = 0; i < columnSize; i++) { data.add((byte) 0); } IntIterator intIterator = hits.iterator(); while (intIterator.hasNext()) { byte b = (byte) 1; int i = intIterator.next(); data.set(i, b); } this.data = data; }