public class ReferenceContext extends java.lang.Object implements java.lang.Comparable<ReferenceContext>
Modifier and Type | Field and Description |
---|---|
static ReferenceContext |
MULTIPLE_REFERENCE_CONTEXT |
static int |
MULTIPLE_REFERENCE_ID |
static ReferenceContext |
UNMAPPED_UNPLACED_CONTEXT |
static int |
UNMAPPED_UNPLACED_ID |
Constructor and Description |
---|
ReferenceContext(int serializableSequenceId)
Create a ReferenceContext from a serializable sequence ID
0 or greater for single reference
-1 for unmapped-unplaced
-2 for multiple reference
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ReferenceContext o) |
boolean |
equals(java.lang.Object o) |
int |
getSequenceId()
Get the valid sequence ID, if single-reference
|
int |
getSerializableId()
Get the ReferenceContext sequence ID or sentinel value, suitable for serialization:
0 or greater for single reference
-1 for unmapped
-2 for multiple reference
|
ReferenceContextType |
getType()
Get the ReferenceContext type: SINGLE_REFERENCE_TYPE, UNMAPPED_UNPLACED_TYPE, or MULTIPLE_REFERENCE_TYPE
|
int |
hashCode() |
boolean |
isMappedSingleRef()
Does this ReferenceContext refer to reads placed on a single reference (whether their unmapped flags are set or not)?
|
boolean |
isMultiRef()
Does this ReferenceContext refer to:
- reads placed on multiple references
- or a combination of placed and unplaced reads?
|
boolean |
isUnmappedUnplaced()
Does this ReferenceContext refer to only unmapped-unplaced reads?
Note: not a guarantee that the unmapped flag is set for all records
|
java.lang.String |
toString() |
public static final int MULTIPLE_REFERENCE_ID
public static final int UNMAPPED_UNPLACED_ID
public static final ReferenceContext MULTIPLE_REFERENCE_CONTEXT
public static final ReferenceContext UNMAPPED_UNPLACED_CONTEXT
public ReferenceContext(int serializableSequenceId)
serializableSequenceId
- the sequence ID or sentinel value for constructing this ReferenceContextpublic ReferenceContextType getType()
ReferenceContextType
enumpublic int getSerializableId()
public int getSequenceId()
CRAMException
- if this is not single-refpublic boolean isUnmappedUnplaced()
CramCompressionRecord.isPlaced()
public boolean isMultiRef()
public boolean isMappedSingleRef()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(ReferenceContext o)
compareTo
in interface java.lang.Comparable<ReferenceContext>
public java.lang.String toString()
toString
in class java.lang.Object