com.taskadapter.redmineapi.bean.PropertyStorage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redmine-java-api Show documentation
Show all versions of redmine-java-api Show documentation
Free open-source Java API for Redmine and Chiliproject bug/task management systems.
This project was originally a part of Task Adapter application (http://www.taskadapter.com)
and then was open-sourced.
The newest version!
package com.taskadapter.redmineapi.bean;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
public final class PropertyStorage {
private final Map, Object> map = new HashMap<>();
public final T get(Property prop) {
return prop.getType().cast(map.get(prop));
}
final void set(Property prop, T value) {
map.put(prop, value);
}
public final boolean isPropertySet(Property> property) {
return map.containsKey(property);
}
public Set, Object>> getProperties() {
return map.entrySet();
}
}