eu.xenit.apix.workflow.search.Facet Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apix-interface Show documentation
Show all versions of apix-interface Show documentation
Xenit API-X Java interface
package eu.xenit.apix.workflow.search;
import java.util.HashMap;
import java.util.Map;
public class Facet {
public String property;
public Map values;
public Facet() {
values = new HashMap<>();
}
public Facet(String property, Map values) {
this.property = property;
this.values = values;
}
public void AddValue(String value) {
if (value == null) {
throw new Error("Cannot add null as value for facet " + this.property);
}
FacetValue fVal = values.get(value);
if (fVal == null) {
fVal = new FacetValue(value, 0);
values.put(value, fVal);
}
fVal.amount++;
}
public String getProperty() {
return property;
}
public void setProperty(String property) {
this.property = property;
}
public Map getValues() {
return values;
}
public void setValues(Map values) {
this.values = values;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy