Package htsjdk.samtools
Class SAMBinaryTagAndValue
java.lang.Object
htsjdk.samtools.SAMBinaryTagAndValue
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
SAMBinaryTagAndUnsignedArrayValue
Holds a SAMRecord attribute and the tagname (in binary form) for that attribute.
SAMRecord stores tag name and value in this form, because much String creation is avoided this way.
See SAMTagUtil to convert the tag to String form.
Values associated with attribute tags must be of a type that implements
Serializable
or else
serialization will fail. Accepted types are String, scalar types Short, Integer, Character, Float,
and Long (see below); array types byte[], short[], int[] and float[]. Cannot be null.
Long valued attributes are constrained to the range [Integer.MIN_VALUE, BinaryCodec.MAX_UINT],
which includes the entire range of signed ints [Integer.MIN_VALUE, Integer.MAX_VALUE] and
the entire range of unsigned ints that can be stored per the BAM spec [0, (Integer.MAX_VALUE * 2) + 1].- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SAMBinaryTagAndValue
static final long
final short
final Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
copy()
Creates and returns a shallow copy of the list of tag/values.deepCopy()
Creates and returns a deep copy of the list of tag/values.boolean
find
(short tag) Returns the SAMBinaryTagAndValue that contains the required tag, or null if not contained.getNext()
int
hashCode()
insert
(SAMBinaryTagAndValue attr) Inserts an item into the ordered list of attributes and returns the head of the list/sub-listprotected static boolean
isAllowedAttributeValue
(Object value) boolean
remove
(short tag) Removes a tag from the list and returns the new head of the list/sub-list.
-
Field Details
-
serialVersionUID
public static final long serialVersionUID- See Also:
-
tag
public final short tag -
value
-
next
-
-
Constructor Details
-
SAMBinaryTagAndValue
- Parameters:
tag
- tagname (in binary form) for this attributevalue
- value for this attribute (must be of a type that implementsSerializable
or else serialization will fail). Cannot be null.
-
-
Method Details
-
isAllowedAttributeValue
-
equals
-
hashCode
public int hashCode() -
copy
Creates and returns a shallow copy of the list of tag/values. -
deepCopy
Creates and returns a deep copy of the list of tag/values. -
cloneValue
-
getNext
-
insert
Inserts an item into the ordered list of attributes and returns the head of the list/sub-list -
remove
Removes a tag from the list and returns the new head of the list/sub-list. -
find
Returns the SAMBinaryTagAndValue that contains the required tag, or null if not contained. -
isUnsignedArray
public boolean isUnsignedArray()
-