mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-08 02:40:09 +00:00
import MessagePack for Java implementation plan 2
This commit is contained in:
parent
93a95725fc
commit
e39e1d4f60
48 changed files with 3676 additions and 0 deletions
52
java-plan2/src/org/msgpack/GenericObject.java
Normal file
52
java-plan2/src/org/msgpack/GenericObject.java
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
package org.msgpack;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public abstract class GenericObject {
|
||||
public boolean asBoolean()
|
||||
{
|
||||
throw new RuntimeException("type error");
|
||||
}
|
||||
|
||||
public byte asByte()
|
||||
{
|
||||
throw new RuntimeException("type error");
|
||||
}
|
||||
|
||||
public short asShort()
|
||||
{
|
||||
throw new RuntimeException("type error");
|
||||
}
|
||||
|
||||
public int asInt()
|
||||
{
|
||||
throw new RuntimeException("type error");
|
||||
}
|
||||
|
||||
public long asLong()
|
||||
{
|
||||
throw new RuntimeException("type error");
|
||||
}
|
||||
|
||||
public String asString()
|
||||
{
|
||||
throw new RuntimeException("type error");
|
||||
}
|
||||
|
||||
public byte[] asBytes()
|
||||
{
|
||||
throw new RuntimeException("type error");
|
||||
}
|
||||
|
||||
public List<GenericObject> asArray()
|
||||
{
|
||||
throw new RuntimeException("type error");
|
||||
}
|
||||
|
||||
public Map<GenericObject,GenericObject> asMap()
|
||||
{
|
||||
throw new RuntimeException("type error");
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue