Package io.vavr.collection
Class NaturalComparator<T>
java.lang.Object
io.vavr.collection.NaturalComparator<T>
- All Implemented Interfaces:
Serializable
,Comparator<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final NaturalComparator
<?> private static final long
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
int
hashCode()
(package private) static <T> NaturalComparator
<T> instance()
private Object
Instance control for object serialization.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
INSTANCE
-
-
Constructor Details
-
NaturalComparator
private NaturalComparator()
-
-
Method Details
-
instance
-
compare
- Specified by:
compare
in interfaceComparator<T>
-
equals
- Specified by:
equals
in interfaceComparator<T>
- Overrides:
equals
in classObject
- See Also:
-
hashCode
public int hashCode() -
readResolve
Instance control for object serialization.- Returns:
- The singleton instance of NaturalComparator.
- See Also:
-