com.factual.driver.Clear Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of factual-java-driver Show documentation
Show all versions of factual-java-driver Show documentation
Factual's officially supported Java driver
The newest version!
package com.factual.driver;
import java.util.List;
import java.util.Map;
public class Clear {
private final Parameters queryParams = new Parameters();
public Clear() {
}
/**
* Constructor for a submit with values initialized as key value pairs in
* mapping.
*/
public Clear(List fields) {
for (String field : fields)
addField(field);
}
protected String toUrlQuery() {
return UrlUtil.toUrlQuery(toUrlParams());
}
/**
* Add the name of a field to be cleared in this request
*
* @param field
* the field name
* @return this Clear
*/
public Clear addField(String field) {
queryParams.addCommaSeparatedParam(Constants.CLEAR_FIELDS, field);
return this;
}
protected Map toUrlParams() {
return queryParams.toUrlParams(null);
}
}