Merger.PairwiseMerger<T>| Modifier and Type | Field and Description |
|---|---|
protected boolean |
_closed |
protected T |
_data1 |
protected T |
_data2 |
protected DataReader<T> |
_reader1 |
protected DataReader<T> |
_reader2 |
_comparator| Constructor and Description |
|---|
PairwiseMerger(Comparator<T> comparator,
DataReader<T> reader1,
DataReader<T> reader2) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Method for closing the reader.
|
int |
estimateSizeInBytes(T item)
Method that should estimate memory usage of given item, for purpose
of limiting amount of data kept in memory during pre-sorting phase.
|
T |
readNext()
Method for reading the next data item; will return
null to indicate end of input, otherwise return a non-null
item.
|
mergedReaderprotected final DataReader<T> _reader1
protected final DataReader<T> _reader2
protected T _data1
protected T _data2
protected boolean _closed
public PairwiseMerger(Comparator<T> comparator, DataReader<T> reader1, DataReader<T> reader2) throws IOException
IOExceptionpublic T readNext() throws IOException
DataReaderreadNext in class DataReader<T>IOExceptionpublic int estimateSizeInBytes(T item)
DataReaderestimateSizeInBytes in class DataReader<T>public void close()
throws IOException
DataReaderclose in class DataReader<T>IOExceptionCopyright © 2022 FasterXML. All rights reserved.