All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.activitystream.sdk.utilities.SimpleMapWrapper Maven / Gradle / Ivy

Go to download

AS-SDK is a java library to allow easy interoperability with Activity Stream.

There is a newer version: 0.1.25
Show newest version
package com.activitystream.sdk.utilities;

import java.util.Map;

/**
 * @author ivan
 */
public class SimpleMapWrapper implements ColumnarDataReader {

    private final Map map;

    public SimpleMapWrapper(Map map) {
        this.map = map;
    }

    @Override
    public String column(Enum column) {
        String value = null;
        if (column instanceof Labeled) {
            value = map.get(((Labeled) column).getLabel());
        }
        if (value == null) {
            value = map.get(column.name());
        }
        return value;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy