Class Ordered<T>

    • Method Detail

      • get

        public T get()
        Return the wrapped value.
        Specified by:
        get in interface Supplier<T>
        Returns:
        the wrapped value
      • of

        public static <T> Ordered<T> of​(T value,
                                        Comparator<? super T> comparator)
        Make the given value comparable, by using the given comparator.
        Type Parameters:
        T - the type of the wrapped object
        Parameters:
        value - the wrapped object, may be null
        comparator - the comparator used for comparing two value objects
        Returns:
        a new ordered object
        Throws:
        NullPointerException - if the given comparator is null