Skip to content

Instantly share code, notes, and snippets.

@frsyuki
Created July 24, 2010 08:04
Show Gist options
  • Save frsyuki/488514 to your computer and use it in GitHub Desktop.
Save frsyuki/488514 to your computer and use it in GitHub Desktop.
package org.msgpack;
import java.util.List;
import java.util.Set;
import java.util.Map;
public abstract class MessagePackObject {
public boolean isNull() {
return false;
}
public boolean asBoolean() {
throw new MessageTypeException("type error");
}
public byte asByte() {
throw new MessageTypeException("type error");
}
public int asInt() {
throw new MessageTypeException("type error");
}
public short asShort() {
throw new MessageTypeException("type error");
}
public long asLong() {
throw new MessageTypeException("type error");
}
public float asFloat() {
throw new MessageTypeException("type error");
}
public double asDouble() {
throw new MessageTypeException("type error");
}
public byte[] asByteArray() {
throw new MessageTypeException("type error");
}
public String asString() {
throw new MessageTypeException("type error");
}
public MessagePackObject[] asArray() {
throw new MessageTypeException("type error");
}
public List<MessagePackObject> asList() {
throw new MessageTypeException("type error");
}
public Map<MessagePackObject,MessagePackObject> asMap() {
throw new MessageTypeException("type error");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment