Class MaxOf

  • All Implemented Interfaces:
    Serializable

    public final class MaxOf
    extends NumberEnvelope
    Find the greater among items.

    Here is how you can use it to find the max of a set of numbers:

     int max = new MaxOf(1, 2, 3, 4).intValue();
     long max = new MaxOf(1L, 2L, 3L).longValue();
     int max = new MaxOf(numbers).intValue();
     

    There is no thread-safety guarantee.

    Since:
    1.0.0
    See Also:
    Serialized Form
    • Constructor Detail

      • MaxOf

        public MaxOf​(Number... src)
        Ctor.
        Parameters:
        src - Numbers
      • MaxOf

        public MaxOf​(Iterable<? extends Number> src)
        Ctor.
        Parameters:
        src - The iterable