Example usage for org.apache.commons.collections.map DefaultedMap decorate

List of usage examples for org.apache.commons.collections.map DefaultedMap decorate

Introduction

In this page you can find the example usage for org.apache.commons.collections.map DefaultedMap decorate.

Prototype

public static Map decorate(Map map, Transformer factory) 

Source Link

Document

Factory method to create a defaulting map.

Usage

From source file:io.fluo.api.types.TypedSnapshotBase.java

@SuppressWarnings({ "unchecked" })
private Map<Column, Value> wrap(Map<Column, Bytes> map) {
    Map<Column, Value> ret = Maps.transformValues(map, new Function<Bytes, Value>() {
        @Override/*from ww w .j a  va 2s  . c o  m*/
        public Value apply(Bytes input) {
            return new Value(input);
        }
    });

    return Collections.unmodifiableMap(DefaultedMap.decorate(ret, new Value((Bytes) null)));
}

From source file:org.apache.fluo.recipes.core.types.TypedSnapshotBase.java

@SuppressWarnings({ "unchecked" })
private Map<Column, Value> wrap(Map<Column, Bytes> map) {
    Map<Column, Value> ret = Maps.transformValues(map, Value::new);
    return Collections.unmodifiableMap(DefaultedMap.decorate(ret, new Value((Bytes) null)));
}

From source file:org.apache.fluo.recipes.types.TypedSnapshotBase.java

@SuppressWarnings({ "unchecked" })
private Map<Column, Value> wrap(Map<Column, Bytes> map) {
    Map<Column, Value> ret = Maps.transformValues(map, input -> new Value(input));
    return Collections.unmodifiableMap(DefaultedMap.decorate(ret, new Value((Bytes) null)));
}