Package org.msgpack.value
Class ValueFactory
- java.lang.Object
-
- org.msgpack.value.ValueFactory
-
public final class ValueFactory extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ValueFactory.MapBuilder
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ImmutableArrayValue
emptyArray()
static ImmutableMapValue
emptyMap()
static ImmutableArrayValue
newArray(java.util.List<? extends Value> list)
static ImmutableArrayValue
newArray(Value... array)
static ImmutableArrayValue
newArray(Value[] array, boolean omitCopy)
static ImmutableBinaryValue
newBinary(byte[] b)
static ImmutableBinaryValue
newBinary(byte[] b, boolean omitCopy)
static ImmutableBinaryValue
newBinary(byte[] b, int off, int len)
static ImmutableBinaryValue
newBinary(byte[] b, int off, int len, boolean omitCopy)
static ImmutableBooleanValue
newBoolean(boolean v)
static ImmutableExtensionValue
newExtension(byte type, byte[] data)
static ImmutableFloatValue
newFloat(double v)
static ImmutableFloatValue
newFloat(float v)
static ImmutableIntegerValue
newInteger(byte v)
static ImmutableIntegerValue
newInteger(int v)
static ImmutableIntegerValue
newInteger(long v)
static ImmutableIntegerValue
newInteger(short v)
static ImmutableIntegerValue
newInteger(java.math.BigInteger v)
static MapValue
newMap(java.util.Map.Entry<? extends Value,? extends Value>... pairs)
static <K extends Value,V extends Value>
ImmutableMapValuenewMap(java.util.Map<K,V> map)
static ImmutableMapValue
newMap(Value... kvs)
static ImmutableMapValue
newMap(Value[] kvs, boolean omitCopy)
static ValueFactory.MapBuilder
newMapBuilder()
static java.util.Map.Entry<Value,Value>
newMapEntry(Value key, Value value)
static ImmutableNilValue
newNil()
static ImmutableStringValue
newString(byte[] b)
static ImmutableStringValue
newString(byte[] b, boolean omitCopy)
static ImmutableStringValue
newString(byte[] b, int off, int len)
static ImmutableStringValue
newString(byte[] b, int off, int len, boolean omitCopy)
static ImmutableStringValue
newString(java.lang.String s)
-
-
-
Method Detail
-
newNil
public static ImmutableNilValue newNil()
-
newBoolean
public static ImmutableBooleanValue newBoolean(boolean v)
-
newInteger
public static ImmutableIntegerValue newInteger(byte v)
-
newInteger
public static ImmutableIntegerValue newInteger(short v)
-
newInteger
public static ImmutableIntegerValue newInteger(int v)
-
newInteger
public static ImmutableIntegerValue newInteger(long v)
-
newInteger
public static ImmutableIntegerValue newInteger(java.math.BigInteger v)
-
newFloat
public static ImmutableFloatValue newFloat(float v)
-
newFloat
public static ImmutableFloatValue newFloat(double v)
-
newBinary
public static ImmutableBinaryValue newBinary(byte[] b)
-
newBinary
public static ImmutableBinaryValue newBinary(byte[] b, boolean omitCopy)
-
newBinary
public static ImmutableBinaryValue newBinary(byte[] b, int off, int len)
-
newBinary
public static ImmutableBinaryValue newBinary(byte[] b, int off, int len, boolean omitCopy)
-
newString
public static ImmutableStringValue newString(java.lang.String s)
-
newString
public static ImmutableStringValue newString(byte[] b)
-
newString
public static ImmutableStringValue newString(byte[] b, boolean omitCopy)
-
newString
public static ImmutableStringValue newString(byte[] b, int off, int len)
-
newString
public static ImmutableStringValue newString(byte[] b, int off, int len, boolean omitCopy)
-
newArray
public static ImmutableArrayValue newArray(java.util.List<? extends Value> list)
-
newArray
public static ImmutableArrayValue newArray(Value... array)
-
newArray
public static ImmutableArrayValue newArray(Value[] array, boolean omitCopy)
-
emptyArray
public static ImmutableArrayValue emptyArray()
-
newMap
public static <K extends Value,V extends Value> ImmutableMapValue newMap(java.util.Map<K,V> map)
-
newMap
public static ImmutableMapValue newMap(Value... kvs)
-
newMap
public static ImmutableMapValue newMap(Value[] kvs, boolean omitCopy)
-
emptyMap
public static ImmutableMapValue emptyMap()
-
newMap
@SafeVarargs public static MapValue newMap(java.util.Map.Entry<? extends Value,? extends Value>... pairs)
-
newMapBuilder
public static ValueFactory.MapBuilder newMapBuilder()
-
newExtension
public static ImmutableExtensionValue newExtension(byte type, byte[] data)
-
-