weiboclient4j.params.LongParam Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of weiboclient4j Show documentation
Show all versions of weiboclient4j Show documentation
Java library for Sina Weibo
package weiboclient4j.params;
/**
* @author Hover Ruan
*/
public abstract class LongParam implements ParameterAction {
private long value;
public LongParam(long value) {
this.value = value;
}
public long getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public boolean isValid() {
return value > 0;
}
protected abstract String paramKey();
public void addParameter(Parameters params) {
if (isValid()) {
params.add(paramKey(), getValue());
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy