weiboclient4j.params.InboxType 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
The newest version!
package weiboclient4j.params;
import weiboclient4j.StatusService;
import java.util.HashMap;
import java.util.Map;
/**
* @author Hover Ruan
*/
public enum InboxType implements
StatusService.QueryIdParam,
StatusService.QueryIdListParam {
Outbox(0), Inbox(1);
private static Map map = new HashMap();
static {
for (InboxType inboxType : InboxType.values()) {
map.put(inboxType.getValue(), inboxType);
}
}
private int value;
InboxType(int value) {
this.value = value;
}
public static InboxType fromValue(int value) {
return map.get(value);
}
public int getValue() {
return value;
}
public void addParameter(Parameters params) {
if (this != Outbox) {
params.add("inbox", getValue());
}
}
}