public class TupleBuffer extends NonScalarValueBuffer
Constructor and Description |
---|
TupleBuffer(boolean mapReferenceLocal,
java.util.Map<NameIdentifier,ValueBuffer> attributeValueMap)
Creates the TupleBuffer
|
TupleBuffer(Heading heading,
java.nio.ByteBuffer attributeValueEncoding)
Creates the TupleBuffer
|
TupleBuffer(java.util.Map<NameIdentifier,ValueBuffer> attributeValueMap,
int dummy)
Creates the TupleBuffer
|
TupleBuffer(java.util.Map<java.lang.String,ValueBuffer> attributeValueMap)
Deprecated.
- replace with
TupleBuffer(Map, int) |
TupleBuffer(java.util.Map<java.lang.String,ValueBuffer> attributeValueMap,
boolean mapReferenceLocal)
Deprecated.
- replace with
TupleBuffer(boolean, Map) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Tells whether or not this TupleBuffer is equal to another object.
|
boolean |
equalsTupleBuffer(TupleBuffer obj)
Tells whether or not this TupleBuffer is equal to another TupleBuffer.
|
static TupleBuffer |
fromStream1_0(Heading heading,
java.io.DataInputStream in)
Reads an encoded TupleBuffer from the given Stream
|
MyReadOnlyMap<NameIdentifier,ValueBuffer> |
getAttributeIdentifierValueMap()
Gets The tuple that this valueBuffer wraps around
|
MyReadOnlyMap<java.lang.String,ValueBuffer> |
getAttributeValueMap()
Deprecated.
- replace with
getAttributeIdentifierValueMap() |
java.nio.ByteBuffer |
getByteBuffer()
Gets a read-only bytebuffer holding an encoding of the value
|
int |
hashCode() |
static void |
toStream1_0(TupleBuffer tupleBuffer,
Heading heading,
java.io.DataOutputStream outputStream)
Streams the given tupleBuffer to the given outputStream
|
java.lang.String |
toString() |
ValueBuffer |
valueBuffer(NameIdentifier attributeName)
Gets the ValueBuffer holding the value associated with the given attribute name
|
ValueBuffer |
valueBuffer(java.lang.String attributeName)
Deprecated.
- replace with
valueBuffer(NameIdentifier) |
intern
public TupleBuffer(boolean mapReferenceLocal, java.util.Map<NameIdentifier,ValueBuffer> attributeValueMap)
attributeValueMap
- The mapping from attribute names to attribute values that constitutes the tuple valuemapReferenceLocal
- can be set to true if the caller can ascertain that no references to attributeValueMap will be left after the calling method exits. This is the case if : (a) the map was created as a local variable in the caller, (b) it was not passed to any methods that could keep this reference somewhere in the state of their objects, and (c) it will not be passed to other methods after this constructor returns. Iow, if the caller can ascertain that the map will become eligible for garbage collection after it exits.public TupleBuffer(Heading heading, java.nio.ByteBuffer attributeValueEncoding)
heading
- the nonscalar type definition that the tuple encoding is known to conform toattributeValueEncoding
- the internal encoding of a tuple valuepublic TupleBuffer(java.util.Map<NameIdentifier,ValueBuffer> attributeValueMap, int dummy)
attributeValueMap
- The mapping from attribute names to attribute values that constitutes the tuple valuedummy
- Unused parameter because java has no way to distinguish constructors depending on the generics of Collection parameters@Deprecated public TupleBuffer(java.util.Map<java.lang.String,ValueBuffer> attributeValueMap)
TupleBuffer(Map, int)
attributeValueMap
- The mapping from attribute names to attribute values that constitutes the tuple value@Deprecated public TupleBuffer(java.util.Map<java.lang.String,ValueBuffer> attributeValueMap, boolean mapReferenceLocal)
TupleBuffer(boolean, Map)
attributeValueMap
- The mapping from attribute names to attribute values that constitutes the tuple valuemapReferenceLocal
- can be set to true if the caller can ascertain that no references to attributeValueMap will be left after the calling method exits. This is the case if : (a) the map was created as a local variable in the caller, (b) it was not passed to any methods that could keep this reference somewhere in the state of their objects, and (c) it will not be passed to other methods after this constructor returns. Iow, if the caller can ascertain that the map will become eligible for garbage collection after it exits.public static TupleBuffer fromStream1_0(Heading heading, java.io.DataInputStream in) throws java.io.IOException
heading
- The heading that the (tuple encoded in the) TupleBuffer conforms toin
- the stream to readjava.io.IOException
- If an IO exception occurspublic static void toStream1_0(TupleBuffer tupleBuffer, Heading heading, java.io.DataOutputStream outputStream) throws java.io.IOException
tupleBuffer
- the TupleBuffer to be streamedheading
- the heading that the tuplebuffer conforms tooutputStream
- the output Streamjava.io.IOException
- If an IO exception occurspublic final boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- The object to which this buffer is to be comparedpublic final boolean equalsTupleBuffer(TupleBuffer obj)
obj
- The object to which this buffer is to be comparedpublic final MyReadOnlyMap<NameIdentifier,ValueBuffer> getAttributeIdentifierValueMap()
@Deprecated public final MyReadOnlyMap<java.lang.String,ValueBuffer> getAttributeValueMap()
getAttributeIdentifierValueMap()
public final java.nio.ByteBuffer getByteBuffer()
ValueBuffer
getByteBuffer
in class ValueBuffer
public final int hashCode()
hashCode
in class java.lang.Object
public final java.lang.String toString()
toString
in class java.lang.Object
public final ValueBuffer valueBuffer(NameIdentifier attributeName)
attributeName
- The name of the attribute whose value is to be returned@Deprecated public final ValueBuffer valueBuffer(java.lang.String attributeName)
valueBuffer(NameIdentifier)
attributeName
- The name of the attribute whose value is to be returned