public class StringSort extends Object implements Iterable<String>, Closeable
| Modifier and Type | Field and Description |
|---|---|
static int |
BATCH_SIZE |
| Constructor and Description |
|---|
StringSort(int overflowToDiskThreshold,
Comparator<String> comparator) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(String id) |
void |
close() |
Iterator<String> |
getIds() |
long |
getSize() |
boolean |
isEmpty() |
Iterator<String> |
iterator() |
void |
sort() |
boolean |
usingFile() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic static final int BATCH_SIZE
public StringSort(int overflowToDiskThreshold,
Comparator<String> comparator)
public void add(String id) throws IOException
IOExceptionpublic void sort()
throws IOException
IOExceptionpublic Iterator<String> getIds() throws IOException
IOExceptionpublic long getSize()
public boolean isEmpty()
public boolean usingFile()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.