Package htsjdk.tribble.IntervalList

# Class IntervalListCodec

java.lang.Object
htsjdk.tribble.AbstractFeatureCodec<Interval,LineIterator>
htsjdk.tribble.AsciiFeatureCodec<Interval>
htsjdk.tribble.IntervalList.IntervalListCodec

All Implemented Interfaces:
  `FeatureCodec<Interval,LineIterator>`

public class IntervalListCodec extends AsciiFeatureCodec<Interval>
A tribble codec for IntervalLists. Also contains the parsing code for the non-tribble parsing of IntervalLists

## Constructor Summary

Constructors
Constructor
Description
`IntervalListCodec()`
`IntervalListCodec(SAMSequenceDictionary dict)`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`canDecode(String s)`
This function returns true iff the File potentialInput can be parsed by this codec.
`Interval`
`decode(String line)`
`Object`
`readActualHeader(LineIterator lineIterator)`
Read and return the header, or null if there is no header.

### Methods inherited from class htsjdk.tribble.AsciiFeatureCodec

`close, decode, isDone, makeIndexableSourceFromStream, makeSourceFromStream, readHeader`

### Methods inherited from class htsjdk.tribble.AbstractFeatureCodec

`decodeLoc, getFeatureType`

### Methods inherited from class java.lang.Object

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

### Methods inherited from interface htsjdk.tribble.FeatureCodec

`getPathToDataFile, getTabixFormat`

## Constructor Details

### IntervalListCodec

public IntervalListCodec()

### IntervalListCodec

public IntervalListCodec(SAMSequenceDictionary dict)

## Method Details

### decode

public Interval decode(String line)

Specified by:
  `decode` in class `AsciiFeatureCodec<Interval>`
See Also:
  - `AsciiFeatureCodec.decode(htsjdk.tribble.readers.LineIterator)`

### readActualHeader

public Object readActualHeader(LineIterator lineIterator)
Description copied from class: `AsciiFeatureCodec`
Read and return the header, or null if there is no header.

Specified by:
  `readActualHeader` in class `AsciiFeatureCodec<Interval>`
Returns:
  the actual header data in the file, or null if none is available

### canDecode

public boolean canDecode(String s)
Description copied from interface: `FeatureCodec`

This function returns true iff the File potentialInput can be parsed by this codec. Note that checking the file's extension is a perfectly acceptable implementation of this method and file contents only rarely need to be checked.

There is an assumption that there's never a situation where two different Codecs return true for the same file. If this occurs, the recommendation would be to error out.

Note this function must never throw an error. All errors should be trapped and false returned.

Parameters:
  `s` - the file to test for parsability with this codec
Returns:
  true if potentialInput can be parsed, false otherwise