@Override public Entry<String, byte[]> next() { Entry<String, ValueObject> input = iterator.next(); return new SimpleEntry<>(input.getKey(), input.getValue().asBytes().asNative()); }
@Override public ValueString asString() throws ValueTranslationException { return ValueFactory.create(Base64.encodeBase64String(asBytes().asNative())); } }
@Override public ValueString asSimple() { return ValueFactory.create(Base64.encodeBase64String(asBytes().asNative())); }
@Override public byte[] remove(int index) { ValueObject prev = data.remove(index); if (prev == null) return null; return prev.asBytes().asNative(); } }
@Override public byte[] get(Object key) { String stringKey = (String) key; ValueObject val = data.get(stringKey); if (val == null) { return null; } else { return val.asBytes().asNative(); } }
@Override public byte[] remove(Object key) { String stringKey = (String) key; ValueObject val = data.remove(stringKey); if (val == null) { return null; } else { return val.asBytes().asNative(); } }
@Override public byte[] get(int index) { ValueObject val = data.get(index); if (val == null) return null; return val.asBytes().asNative(); }
@Override public byte[] put(String key, byte[] value) { ValueObject val = data.put(key, ValueFactory.create(value)); if (val == null) { return null; } else { return val.asBytes().asNative(); } }
@Override public void setValues(ValueMap map) { ValueObject vo = map.get(key); if (vo != null) { BloomFilter.deserialize(vo.asBytes().asNative()); } }
@Override public byte[] set(int index, byte[] element) { ValueObject prev = data.set(index, ValueFactory.create(element)); if (prev == null) return null; return prev.asBytes().asNative(); }
@Override public void setValues(ValueMap valueMapEntries) { byte[] b = valueMapEntries.get("b").asBytes().asNative(); this.quantile = valueMapEntries.get("q").asDouble().getDouble(); this.op = OP.valueOf(valueMapEntries.get("o").asString().toString()); heldObject = TDigest.fromBytes(ByteBuffer.wrap(b)); }
@Override public void setValues(ValueMap map) { try { heldObject = (SeenFilterBasic<?>) CodecBin2.decodeBytes( new SeenFilterBasic(), map.get("b").asBytes().asNative()); } catch (Exception ex) { throw new ValueTranslationException(ex); } }
return value.asString().asNative(); case BYTES: return value.asBytes().asNative(); case INT: return value.asLong().asNative().intValue();
return value.asString().asNative(); case BYTES: return value.asBytes().asNative(); case INT: return value.asLong().asNative().intValue();
@Override public void setValues(ValueMap map) { byte[] b = map.get("b").asBytes().asNative(); switch ((int) map.get("t").asLong().getLong()) { case VER_LINEAR:
assertTrue(row1.mergedRow[1].asString().asNative().equals(row2.mergedRow[1].asString().asNative())); assertTrue(row1.mergedRow[2].asLong().getLong() == row2.mergedRow[2].asLong().getLong()); byte[] row2bytes = row1.mergedRow[3].asBytes().asNative(); assertTrue(row2bytes.length == 4); assertTrue(row2bytes[0] == 5);