# Class SamRecordWithOrdinal

java.lang.Object
htsjdk.samtools.util.SamRecordWithOrdinal

public abstract class SamRecordWithOrdinal extends Object
A little class to store the unique index associated with this record. The index is determined as records are read in, so is in fact gives the ordinal of the record in the input file. All sub-classes should have a default constructor. Additionally, all implementations of this class must implement setResultState, as this class is typically used when wanting to return SAMRecord's in same input order, but only when some computation (ex. duplicate marking) has been performed.

## Constructor Summary

Constructors
Constructor
Description
`SamRecordWithOrdinal()`
`SamRecordWithOrdinal(SAMRecord record, long recordOrdinal)`

## Method Summary

Modifier and Type
Method
Description
`SAMRecord`
`getRecord()`
`long`
`getRecordOrdinal()`
`void`
`setRecord(SAMRecord record)`
`void`
`setRecordOrdinal(long recordOrdinal)`
`abstract void`
`setResultState(boolean resultState)`
Set the result state on this record.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SamRecordWithOrdinal

public SamRecordWithOrdinal()

### SamRecordWithOrdinal

public SamRecordWithOrdinal(SAMRecord record, long recordOrdinal)

## Method Details

### getRecord

public SAMRecord getRecord()

### setRecord

public void setRecord(SAMRecord record)

### getRecordOrdinal

public long getRecordOrdinal()

### setRecordOrdinal

public void setRecordOrdinal(long recordOrdinal)

### setResultState

public abstract void setResultState(boolean resultState)
Set the result state on this record.