/** * Get {@link ValueObject#value() value object value} by key from the * store. * @param key the key * @param <T> the generic type of the return value * @return the value stored in the value object associated with the key * @see ValueObject#value() */ @Override public <T> T getValue(String key) { ValueObject vo = get(key); if (null == vo) { return null; } return vo.value(); }
/** * Get {@link ValueObject#value() value object value} by key from the * store. * @param key the key * @param <T> the generic type of the return value * @return the value stored in the value object associated with the key * @see ValueObject#value() */ @Override public <T> T getValue(String key) { ValueObject vo = get(key); if (null == vo) { return null; } return vo.value(); }
/** * Returns a `Map` contains (key, value) pairs that stored in this * `KVStore`. The value in the pair should be the {@link ValueObject#value()} * stored in the {@link ValueObject} in this `KVStore` * * @return the map of key and raw value stored in this store */ @Override public Map<String, Object> toMap() { Map<String, Object> map = C.newMap(); for (Map.Entry<String, ValueObject> entry : entrySet()) { map.put(entry.getKey(), entry.getValue().value()); } return map; }
/** * Returns a `Map` contains (key, value) pairs that stored in this * `KVStore`. The value in the pair should be the {@link ValueObject#value()} * stored in the {@link ValueObject} in this `KVStore` * * @return the map of key and raw value stored in this store */ @Override public Map<String, Object> toMap() { Map<String, Object> map = C.newMap(); for (Map.Entry<String, ValueObject> entry : entrySet()) { map.put(entry.getKey(), entry.getValue().value()); } return map; }
public ValueObject(ValueObject copy) { type = copy.type(); type.set(copy.value(), this); }
public ValueObject(ValueObject copy) { type = copy.type(); type.set(copy.value(), this); }
public ValueObject(Object o) { if (o instanceof ValueObject) { ValueObject that = (ValueObject) o; type = that.type(); type.set(that.value(), this); } else { type = typeOf(o); type.set(o, this); } }
public ValueObject(Object o) { if (o instanceof ValueObject) { ValueObject that = (ValueObject) o; type = that.type(); type.set(that.value(), this); } else { type = typeOf(o); type.set(o, this); } }
ValueObject vo = (ValueObject) entity; if (vo.isUDF()) { entity = vo.value();
ValueObject vo = (ValueObject) entity; if (vo.isUDF()) { entity = vo.value();
Object value = null == vo ? null : vo.value();
Object value = null == vo ? null : vo.value();