com.activitystream.sdk.utilities.SimpleMapWrapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of as-sdk Show documentation
Show all versions of as-sdk Show documentation
AS-SDK is a java library to allow easy interoperability with Activity Stream.
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