org.zendesk.client.v2.TemplateUri Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zendesk-java-client Show documentation
Show all versions of zendesk-java-client Show documentation
Java client for the Zendesk API
The newest version!
package org.zendesk.client.v2;
import com.damnhandy.uri.template.UriTemplate;
import java.util.Date;
import java.util.Map;
/**
* @author stephenc
* @since 05/04/2013 10:07
*/
class TemplateUri extends Uri {
private final UriTemplate uri;
public TemplateUri(UriTemplate uri) {
this.uri = uri;
}
public TemplateUri(String uri) {
this.uri = UriTemplate.fromTemplate(uri);
}
public TemplateUri set(Map values) {
uri.set(values);
return this;
}
public TemplateUri set(String variableName, Date value) {
uri.set(variableName, value);
return this;
}
public TemplateUri set(String variableName, Object value) {
uri.set(variableName, value);
return this;
}
@Override
public String toString() {
return uri.expand();
}
}