Uses of Class
fj.Ord

Packages that use Ord
Package
Description
Types that set the premise for the existence of Functional Java.
Common algebraic data types.
 
  • Uses of Ord in fj

    Fields in fj declared as Ord
    Modifier and Type
    Field
    Description
    static final Ord<BigDecimal>
    An order instance for the BigDecimal type.
    static final Ord<BigInteger>
    An order instance for the BigInteger type.
    static final Ord<Boolean>
    An order instance for the boolean type.
    static final Ord<Byte>
    An order instance for the byte type.
    static final Ord<Character>
    An order instance for the char type.
    static final Ord<Double>
    An order instance for the double type.
    static final Ord<Float>
    An order instance for the float type.
    static final Ord<Integer>
    Ord.intOrd
    An order instance for the int type.
    static final Ord<Long>
    An order instance for the long type.
    static final Ord<Natural>
    An order instance for the Natural type.
    static final Ord<Ordering>
    An order instance for the Ordering type.
    static final Ord<Short>
    An order instance for the short type.
    static final Ord<StringBuffer>
    An order instance for the StringBuffer type.
    static final Ord<StringBuilder>
    An order instance for the StringBuffer type.
    static final Ord<String>
    An order instance for the String type.
    static final Ord<Unit>
    An order instance for the Unit type.
    Methods in fj that return Ord
    Modifier and Type
    Method
    Description
    static <A> Ord<Array<A>>
    Ord.arrayOrd(Ord<A> oa)
    An order instance for the Array type.
    static <A extends Comparable<A>>
    Ord<A>
    An order instance for the Comparable interface.
    static <A,B> Ord<A>
    Ord.contramap(F<A,B> f, Ord<B> ord)
    Static version of Ord.contramap(F)
    <B> Ord<B>
    Ord.contramap(F<B,A> f)
    Maps the given function across this ord as a contra-variant functor.
    static <A,B> Ord<Either<A,B>>
    Ord.eitherOrd(Ord<A> oa, Ord<B> ob)
    An order instance for the Either type.
    static <A> Ord<List<A>>
    Ord.listOrd(Ord<A> oa)
    An order instance for the List type.
    static <A> Ord<NonEmptyList<A>>
    Ord.nonEmptyListOrd(Ord<A> oa)
    An order instance for the NonEmptyList type.
    static <A> Ord<Option<A>>
    Ord.optionOrd(Ord<A> oa)
    An order instance for the Option type.
    default Ord<A>
    Ord.Definition.ord()
    Build an ord instance from this definition. to be called after some successive Ord.Definition.then(F, Ord) calls.
    static <A> Ord<A>
    Ord.ord(F<A, F<A,Ordering>> f)
    Returns an order instance that uses the given equality test and ordering function.
    static <A> Ord<A>
    Ord.ord(F2<A,A,Ordering> f)
    Returns an order instance that uses the given equality test and ordering function.
    static <A> Ord<A>
    Returns an order instance that uses the given minimal equality test and ordering definition.
    static <A> Ord<A>
    Ord.ordDef(Ord.Definition<A> def)
    Returns an order instance that uses the given minimal equality test and ordering definition.
    static <A> Ord<P1<A>>
    Ord.p1Ord(Ord<A> oa)
    An order instance for a product-1.
    static <A,B> Ord<P2<A,B>>
    Ord.p2Ord(Ord<A> oa, Ord<B> ob)
    An order instance for a product-2, with the first factor considered most significant.
    static <A,B> Ord<P2<A,B>>
    Ord.p2Ord1(Ord<A> oa)
     
    static <A,B> Ord<P2<A,B>>
    Ord.p2Ord2(Ord<B> ob)
     
    static <A,B,C> Ord<P3<A,B,C>>
    Ord.p3Ord(Ord<A> oa, Ord<B> ob, Ord<C> oc)
    An order instance for a product-3, with the first factor considered most significant.
    final Ord<A>
    Ord.reverse()
     
    static <A> Ord<Seq<A>>
    Ord.seqOrd(Ord<A> ord)
    Return a seq ord using the given value ord.
    static <A> Ord<Set<A>>
    Ord.setOrd(Ord<A> oa)
    An order instance for the Set type.
    static <A> Ord<Stream<A>>
    Ord.streamOrd(Ord<A> oa)
    An order instance for the Stream type.
    static <A,B> Ord<Validation<A,B>>
    Ord.validationOrd(Ord<A> oa, Ord<B> ob)
    An order instance for the Validation type.
    Methods in fj with parameters of type Ord
    Modifier and Type
    Method
    Description
    static <A> Ord<Array<A>>
    Ord.arrayOrd(Ord<A> oa)
    An order instance for the Array type.
    static <A,B> Ord<A>
    Ord.contramap(F<A,B> f, Ord<B> ord)
    Static version of Ord.contramap(F)
    static <A,B> Ord<Either<A,B>>
    Ord.eitherOrd(Ord<A> oa, Ord<B> ob)
    An order instance for the Either type.
    static <A> Ord<List<A>>
    Ord.listOrd(Ord<A> oa)
    An order instance for the List type.
    default F<Set<A>,Set<B>>
    F.mapSet(Ord<B> o)
    Promotes this function to map over a Set.
    static <A> Ord<NonEmptyList<A>>
    Ord.nonEmptyListOrd(Ord<A> oa)
    An order instance for the NonEmptyList type.
    static <A,B> Ord.Definition<A>
    Ord.on(F<A,B> f, Ord<B> ord)
    Begin definition of an ord instance.
    static <A> Ord<Option<A>>
    Ord.optionOrd(Ord<A> oa)
    An order instance for the Option type.
    static <A> Ord<P1<A>>
    Ord.p1Ord(Ord<A> oa)
    An order instance for a product-1.
    static <A,B> Ord<P2<A,B>>
    Ord.p2Ord(Ord<A> oa, Ord<B> ob)
    An order instance for a product-2, with the first factor considered most significant.
    static <A,B> Ord<P2<A,B>>
    Ord.p2Ord1(Ord<A> oa)
     
    static <A,B> Ord<P2<A,B>>
    Ord.p2Ord2(Ord<B> ob)
     
    static <A,B,C> Ord<P3<A,B,C>>
    Ord.p3Ord(Ord<A> oa, Ord<B> ob, Ord<C> oc)
    An order instance for a product-3, with the first factor considered most significant.
    static <A> Ord<Seq<A>>
    Ord.seqOrd(Ord<A> ord)
    Return a seq ord using the given value ord.
    default F<A,Set<B>>
    F.setK(Ord<B> o)
    Promotes this function to return its value in a Set.
    default F2<Set<A>,Set<B>,Set<C>>
    F2.setM(Ord<C> o)
    Promotes this function to a function on Sets.
    static <A> Monoid<Set<A>>
    Monoid.setMonoid(Ord<A> o)
    A union monoid for sets.
    static <A> Ord<Set<A>>
    Ord.setOrd(Ord<A> oa)
    An order instance for the Set type.
    static <A> Ord<Stream<A>>
    Ord.streamOrd(Ord<A> oa)
    An order instance for the Stream type.
    default <B> Ord.Definition<A>
    Ord.Definition.then(F<A,B> f, Ord<B> bOrd)
    Refine this ord definition: compares using self and if objects are equal compares using given Ord.
    static <A,B> Ord<Validation<A,B>>
    Ord.validationOrd(Ord<A> oa, Ord<B> ob)
    An order instance for the Validation type.
    default F2<Set<A>,Set<B>,Set<C>>
    F2.zipSetM(Ord<C> o)
    Promotes this function to zip two sets, applying the function lock-step over both sets.
  • Uses of Ord in fj.data

    Methods in fj.data that return Ord
    Modifier and Type
    Method
    Description
    final Ord<A>
    Set.ord()
    Returns the order of this Set.
    static <A> Ord<Zipper<A>>
    Zipper.ord(Ord<A> o)
    An Ord instance for Zippers.
    Enumerator.order()
    Returns the ordering for the enumerator.
    Methods in fj.data that return types with arguments of type Ord
    Modifier and Type
    Method
    Description
    final <B> F2<Ord<B>, F<A,Set<B>>, Set<Option<B>>>
    Option.traverseSet()
     
    Methods in fj.data with parameters of type Ord
    Modifier and Type
    Method
    Description
    static <A> Set<A>
    Set.arraySet(Ord<A> o, A... as)
    Return the elements of the given iterator as a set.
    static <K,V> TreeMap<K,V>
    TreeMap.arrayTreeMap(Ord<K> keyOrd, P2<K,V>... ps)
    Constructs a tree map from the given elements.
    final <B> Set<B>
    Set.bind(Ord<B> o, F<A,Set<B>> f)
    Binds the given function across this set.
    static <A> Set<A>
    Set.empty(Ord<A> ord)
    The empty set.
    static <K,V> TreeMap<K,V>
    TreeMap.empty(Ord<K> keyOrd)
    Constructs an empty tree map.
    static <A> Enumerator<A>
    Enumerator.enumerator(F<A, Option<A>> successor, F<A, Option<A>> predecessor, Option<A> max, Option<A> min, Ord<A> order)
    Construct an enumerator.
    static <A> Enumerator<A>
    Enumerator.enumerator(F<A, Option<A>> successor, F<A, Option<A>> predecessor, Option<A> max, Option<A> min, Ord<A> order, F<A, F<Long, Option<A>>> plus)
    Construct an enumerator
    static <K,V> TreeMap<K,V>
    TreeMap.fromMutableMap(Ord<K> ord, Map<K,V> m)
    An immutable projection of the given mutable map.
    final <B,C,D> TreeMap<B,D>
    List.groupBy(F<A,B> keyFunction, F<A,C> valueFunction, D groupingIdentity, F2<C,D,D> groupingAcc, Ord<B> keyOrd)
    Groups the elements of this list by a given keyFunction, applies the valueFunction and accumulates the mapped values with the given grouping accumulator function on the grouping identity.
    final <B,C> TreeMap<B,C>
    List.groupBy(F<A,B> keyFunction, F<A,C> valueFunction, Monoid<C> monoid, Ord<B> keyOrd)
    Groups the elements of this list by a given keyFunction into a TreeMap and transforms the matching elements with the given valueFunction.
    final <B,C> TreeMap<B,List<C>>
    List.groupBy(F<A,B> keyFunction, F<A,C> valueFunction, Ord<B> keyOrd)
    Groups the elements of this list by a given keyFunction into a TreeMap and transforms the matching elements with the given valueFunction.
    final <B> TreeMap<B,List<A>>
    List.groupBy(F<A,B> keyFunction, Ord<B> keyOrd)
    Groups the elements of this list by a given keyFunction into a TreeMap.
    boolean
    PriorityQueue.isEqual(Ord<K> ok, K k)
     
    boolean
    PriorityQueue.isGreaterThan(Ord<K> ok, K k)
     
    boolean
    PriorityQueue.isLessThan(Ord<K> ok, K k)
    Does the top of the queue have lower priority than k?
    static <A> Set<A>
    Set.iterableSet(Ord<A> o, Iterable<A> as)
    Return the elements of the given iterable as a set.
    static <K,V> TreeMap<K,V>
    TreeMap.iterableTreeMap(Ord<K> keyOrd, Iterable<P2<K,V>> it)
    Constructs a tree map from the given elements.
    static <A> Set<A>
    Set.iteratorSet(Ord<A> o, Iterator<A> as)
    Return the elements of the given iterator as a set.
    static <K,V> TreeMap<K,V>
    TreeMap.iteratorTreeMap(Ord<K> keyOrd, Iterator<P2<K,V>> it)
    Constructs a tree map from the given elements.
    static <A> Set<A>
    Set.join(Ord<A> o, Set<Set<A>> s)
    Join a set of sets into a single set.
    final <B> Set<B>
    Set.map(Ord<B> o, F<A,B> f)
    Maps the given function across this set.
    final A
    List.maximum(Ord<A> o)
    Returns the maximum element in this list according to the given ordering.
    final A
    NonEmptyList.maximum(Ord<A> o)
    Returns the maximum element in this non empty list according to the given ordering.
    final Option<A>
    List.maximumOption(Ord<A> o)
    Returns the maximum element in this list according to the given ordering.
    final A
    List.minimum(Ord<A> o)
    Returns the minimum element in this list according to the given ordering.
    final A
    NonEmptyList.minimum(Ord<A> o)
    Returns the minimum element in this non empty list according to the given ordering.
    final Option<A>
    List.minimumOption(Ord<A> o)
    Returns the minimum element in this list according to the given ordering.
    final A
    List.mode(Ord<A> o)
    Returns the most common element in this list.
    final List<A>
    List.nub(Ord<A> o)
    Removes duplicates according to the given ordering.
    static <A> Ord<Zipper<A>>
    Zipper.ord(Ord<A> o)
    An Ord instance for Zippers.
    static final <B> Set<List<B>>
    List.sequenceSet(Ord<B> ord, List<Set<B>> list)
    Sequence the given list and collect the output as a set; use the given ord to order the set.
    static final <B> Set<Option<B>>
    Option.sequenceSet(Ord<B> ord, Option<Set<B>> option)
    Sequence the given option and collect the output as a set; use the given ord to order the set.
    static <B> Set<Seq<B>>
    Seq.sequenceSet(Ord<B> ord, Seq<Set<B>> seq)
    Sequence the given seq and collect the output as a set; use the given ord to order the set.
    static <B> Set<Stream<B>>
    Stream.sequenceSet(Ord<B> ord, Stream<Set<B>> stream)
    Sequence the given stream and collect the output as a set; use the given ord to order the set.
    static final <E,C> Set<Validation<E,C>>
    Validation.sequenceSet(Ord<E> ordE, Ord<C> ordC, Validation<E,Set<C>> validation)
    Sequence the given validation and collect the output as a set.
    static <A> Set<A>
    Set.set(Ord<A> o, A... as)
    Constructs a set from the given elements.
    static <K,V> TreeMap<K,V>
    TreeMap.setTreeMap(Ord<K> ord, Set<P2<K, Option<V>>> s)
    Constructs a TreeMap from the given set.
    static <A> Set<A>
    Set.single(Ord<A> o, A a)
    Returns a set with a single element.
    final List<A>
    List.sort(Ord<A> o)
    Sorts this list using the given order over elements using a merge sort algorithm.
    NonEmptyList.sort(Ord<A> o)
    Sorts this non empty list using the given order over elements using a merge sort algorithm.
    final Stream<A>
    Stream.sort(Ord<A> o)
    Sort this stream according to the given ordering.
    final Stream<A>
    Stream.sort(Ord<A> o, Strategy<Unit> s)
    Sort this stream according to the given ordering, using a parallel Quick Sort algorithm that uses the given parallelisation strategy.
    P3<Set<V>, Option<V>, Set<V>>
    TreeMap.split(Ord<V> ord, K k)
    Splits this TreeMap at the given key.
    final <B> Set<List<B>>
    List.traverseSet(Ord<B> ord, F<A,Set<B>> f)
    Traverse this list with the given function and collect the output as a set; use the given ord to order the set.
    final <B> Set<Option<B>>
    Option.traverseSet(Ord<B> ord, F<A,Set<B>> f)
    Traverse this option with the given function and collect the output as a set; use the given ord to order the set.
    <B> Set<Seq<B>>
    Seq.traverseSet(Ord<B> ord, F<A,Set<B>> f)
    Traverse this seq with the given function and collect the output as a set; use the given ord to order the set.
    <B> Set<Stream<B>>
    Stream.traverseSet(Ord<B> ord, F<A,Set<B>> f)
    Traverse this stream with the given function and collect the output as a set; use the given ord to order the set.
    final <C> Set<Validation<E,C>>
    Validation.traverseSet(Ord<E> ordE, Ord<C> ordC, F<T,Set<C>> f)
    Traverse this validation with the given function and collect the output as a set; use the given success and failure value ords to order the set.
    static <K,V> TreeMap<K,V>
    TreeMap.treeMap(Ord<K> keyOrd, P2<K,V>... p2s)
    Constructs a tree map from the given elements.
  • Uses of Ord in fj.data.hamt

    Methods in fj.data.hamt with parameters of type Ord
    Modifier and Type
    Method
    Description
    HashArrayMappedTrie.toList(Ord<K> o)
    Returns the list of key-value pairs, ordered by key.