UNPKG

graph-builder

Version:

A graph builder library for modeling abstract graph structures.

17 lines (16 loc) 781 B
import { Comparable } from "./Comparable"; import { Ordering } from "./Ordering"; export declare class NaturalOrdering<T> extends Ordering<Comparable<T>> { static INSTANCE: NaturalOrdering<any>; /** * Returns a serializable ordering that uses the natural order of the values. The ordering throws * a {@link NullPointerException} when passed a null parameter. * * <p>The type specification is `<C extends Comparable>`, instead of the technically correct * `<C extends Comparable<? super C>>`, to support legacy types from before Java 5. * * <p><b>Java 8 users:</b> use {@link Comparator.naturalOrder} instead. */ static of<C extends Comparable<C>>(): Ordering<C>; compare(left: Comparable<T>, right: Comparable<T>): number; }