io.hypertrack.model.HyperTrackModel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hypertrack-java Show documentation
Show all versions of hypertrack-java Show documentation
A Java wrapper for the HyperTrack API https://hypertrack.io
package io.hypertrack.model;
import com.google.gson.Gson;
import java.util.Map;
/**
* Created by Arjun on 18/04/16.
*/
public abstract class HyperTrackModel {
private Map properties;
protected HyperTrackModel() {
this(null);
}
protected HyperTrackModel(final Map properties) {
this.properties = properties;
}
public Boolean existsProperty(String key) {
return properties.containsKey(key);
}
public String getProperties() {
Gson gson = new Gson();
return gson.toJson(this.properties);
}
public Object getProperty(String key) {
return properties.get(key);
}
public void setProperties(Map map) {
this.properties = map;
}
public void setProperty(String key, Object value) {
this.properties.put(key, value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy