T
- the type of objects that may be compared by this comparator@FunctionalInterface
public interface IOComparator<T>
Comparator
but throws IOException
.Comparator
Modifier and Type | Method and Description |
---|---|
default java.util.Comparator<T> |
asComparator()
Creates a
Comparator for this instance that throws UncheckedIOException instead of
IOException . |
int |
compare(T o1,
T o2)
Like
Comparator.compare(Object, Object) but throws IOException . |
default java.util.Comparator<T> asComparator()
Comparator
for this instance that throws UncheckedIOException
instead of
IOException
.int compare(T o1, T o2) throws java.io.IOException
Comparator.compare(Object, Object)
but throws IOException
.o1
- the first object to be compared.o2
- the second object to be compared.java.lang.NullPointerException
- if an argument is null and this comparator does not permit null argumentsjava.lang.ClassCastException
- if the arguments' types prevent them from being compared by this comparator.java.io.IOException
- if an I/O error occurs.Copyright © 2010 - 2023 Adobe. All Rights Reserved