Scoop API

scoop:scoop.std:0.1.0

scoop.comparisons

API

  • interface Comparator

    Defines an ordering: negative means the first value precedes the second, zero means equivalent, and positive means it follows.

  • function comparatorOf

    Wraps the supplied comparison function as a Comparator.

  • function compareBy

    Compares the keys produced by the selector using the supplied or natural key ordering.

  • function naturalOrder

    Uses the element type's compareTo operation as an ascending comparator.

  • function reverseOrder

    Reverses the element type's natural ordering.

  • function reversed

    Returns a comparator with the opposite ordering, preserving equality.

  • function thenBy

    Uses the additional selected-key comparison only when the original comparator reports equality.