public class ElementComparator extends Object implements Comparator<String>
Constructor and Description |
---|
ElementComparator() |
Modifier and Type | Method and Description |
---|---|
int |
compare(String o1,
String o2)
Returns a negative if o1 comes before o2 in a molecular formula,
returns zero if they are identical, and positive if o1 comes
after o2 in the formula.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public int compare(String o1, String o2)
compare
in interface Comparator<String>
Copyright © 2021. All rights reserved.