org.msgpack.value
Class ValueFactory
java.lang.Object
org.msgpack.value.ValueFactory
public class ValueFactory
- extends java.lang.Object
Factory for creting Value instances
Constructor Summary |
protected |
ValueFactory()
Hide the default constructor to forbid instantiation of this class |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ValueFactory
protected ValueFactory()
- Hide the default constructor to forbid instantiation of this class
nilValue
public static NilValue nilValue()
newBoolean
public static BooleanValue newBoolean(boolean v)
newByte
public static IntegerValue newByte(byte v)
newShort
public static IntegerValue newShort(short v)
newInt
public static IntegerValue newInt(int v)
newLong
public static IntegerValue newLong(long v)
newBigInteger
public static IntegerValue newBigInteger(java.math.BigInteger v)
newFloat
public static FloatValue newFloat(float v)
newDouble
public static FloatValue newDouble(double v)
newBinary
public static BinaryValue newBinary(byte[] b)
newBinary
public static BinaryValue newBinary(byte[] b,
int off,
int len)
newBinary
public static BinaryValue newBinary(java.nio.ByteBuffer bb)
newString
public static StringValue newString(java.lang.String s)
newRawString
public static StringValue newRawString(byte[] b)
newRawString
public static StringValue newRawString(byte[] b,
int off,
int len)
newRawString
public static StringValue newRawString(java.nio.ByteBuffer bb)
newArrayFrom
public static ArrayValue newArrayFrom(java.util.List<? extends Value> list)
newArray
public static ArrayValue newArray(Value... array)
emptyArray
public static ArrayValue emptyArray()
newMap
public static <K extends Value,V extends Value> MapValue newMap(java.util.Map<K,V> map)
newMap
public static MapValue newMap(Value[] keyValueSequence)
emptyMap
public static MapValue emptyMap()
newExtendedValue
public static ExtendedValue newExtendedValue(int extType,
byte[] extData)
newExtendedValue
public static ExtendedValue newExtendedValue(int extType,
java.nio.ByteBuffer extData)