public static enum SparseMatrix.Entry.TopLeftFirstComparator extends Enum<SparseMatrix.Entry.TopLeftFirstComparator> implements Comparator<SparseMatrix.Entry>
Comparator sorts the matrix coordinates first from top to
bottom (rows), and then from left to right (columns).| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(SparseMatrix.Entry o1,
SparseMatrix.Entry o2) |
static SparseMatrix.Entry.TopLeftFirstComparator |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SparseMatrix.Entry.TopLeftFirstComparator[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic static final SparseMatrix.Entry.TopLeftFirstComparator INSTANCE
public static SparseMatrix.Entry.TopLeftFirstComparator[] values()
for (SparseMatrix.Entry.TopLeftFirstComparator c : SparseMatrix.Entry.TopLeftFirstComparator.values()) System.out.println(c);
public static SparseMatrix.Entry.TopLeftFirstComparator valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic int compare(SparseMatrix.Entry o1, SparseMatrix.Entry o2)
compare in interface Comparator<SparseMatrix.Entry>Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.