Package picard.util

# Class DelimitedTextFileWithHeaderIterator

java.lang.Object
picard.util.DelimitedTextFileWithHeaderIterator

All Implemented Interfaces:
  `htsjdk.samtools.util.CloseableIterator<DelimitedTextFileWithHeaderIterator.Row>`, `Closeable`, `AutoCloseable`, `Iterator<DelimitedTextFileWithHeaderIterator.Row>`

public class DelimitedTextFileWithHeaderIterator extends Object implements htsjdk.samtools.util.CloseableIterator<DelimitedTextFileWithHeaderIterator.Row>
Iterate through a delimited text file in which columns are found by looking at a header line rather than by position. TODO: This effectively replaces TabbedTextFileWithHeaderParser although the latter hasn't been modified to use this code instead.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`class`
`DelimitedTextFileWithHeaderIterator.Row`

## Constructor Summary

Constructors
Constructor
Description
`DelimitedTextFileWithHeaderIterator(BasicInputParser parser)`

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
`Set<String>`
`columnLabels()`
`Set<String>`
`getColumnNames()`
`int`
`getCurrentLineNumber()`
`boolean`
`hasColumn(String columnLabel)`
`boolean`
`hasNext()`
`DelimitedTextFileWithHeaderIterator.Row`
`next()`
`void`
`remove()`

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

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

### Methods inherited from interface htsjdk.samtools.util.CloseableIterator

`stream, toList`

### Methods inherited from interface java.util.Iterator

`forEachRemaining`

## Constructor Details

### DelimitedTextFileWithHeaderIterator

public DelimitedTextFileWithHeaderIterator(BasicInputParser parser)

## Method Details

### hasColumn

public boolean hasColumn(String columnLabel)

Parameters:
  `columnLabel` -
Returns:
  True if the given column label appears in the header.

### columnLabels

public Set<String> columnLabels()

Returns:
  The set of column labels for this file in no particular order.

### getCurrentLineNumber

public int getCurrentLineNumber()

### getColumnNames

public Set<String> getColumnNames()

### hasNext

public boolean hasNext()

Specified by:
  `hasNext` in interface `Iterator<DelimitedTextFileWithHeaderIterator.Row>`

### next

public DelimitedTextFileWithHeaderIterator.Row next()

Specified by:
  `next` in interface `Iterator<DelimitedTextFileWithHeaderIterator.Row>`

### remove

public void remove()

Specified by:
  `remove` in interface `Iterator<DelimitedTextFileWithHeaderIterator.Row>`

### close

public void close()

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `Closeable`
Specified by:
  `close` in interface `htsjdk.samtools.util.CloseableIterator<DelimitedTextFileWithHeaderIterator.Row>`