Package fj.function

Class Longs


  • public final class Longs
    extends java.lang.Object
    Curried functions over Longs.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static F<java.lang.Long,​java.lang.Long> abs
      Absolute value.
      static F<java.lang.Long,​F<java.lang.Long,​java.lang.Long>> add
      Curried Long addition.
      static F<java.lang.Long,​F<java.lang.Long,​java.lang.Long>> multiply
      Curried Long multiplication.
      static F<java.lang.Long,​java.lang.Long> negate
      Negation.
      static F<java.lang.Long,​F<java.lang.Long,​java.lang.Long>> remainder
      Remainder.
      static F<java.lang.Long,​F<java.lang.Long,​java.lang.Long>> subtract
      Curried Long subtraction.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Longs()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static F<java.lang.String,​Option<java.lang.Long>> fromString()
      A function that converts strings to integers.
      static long product​(List<java.lang.Long> longs)
      Returns the product of a list of integers.
      static long sum​(List<java.lang.Long> longs)
      Sums a list of longs.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • add

        public static final F<java.lang.Long,​F<java.lang.Long,​java.lang.Long>> add
        Curried Long addition.
      • multiply

        public static final F<java.lang.Long,​F<java.lang.Long,​java.lang.Long>> multiply
        Curried Long multiplication.
      • subtract

        public static final F<java.lang.Long,​F<java.lang.Long,​java.lang.Long>> subtract
        Curried Long subtraction.
      • negate

        public static final F<java.lang.Long,​java.lang.Long> negate
        Negation.
      • abs

        public static final F<java.lang.Long,​java.lang.Long> abs
        Absolute value.
      • remainder

        public static final F<java.lang.Long,​F<java.lang.Long,​java.lang.Long>> remainder
        Remainder.
    • Constructor Detail

      • Longs

        private Longs()
    • Method Detail

      • sum

        public static long sum​(List<java.lang.Long> longs)
        Sums a list of longs.
        Parameters:
        longs - A list of longs to sum.
        Returns:
        The sum of the longs in the list.
      • product

        public static long product​(List<java.lang.Long> longs)
        Returns the product of a list of integers.
        Parameters:
        longs - A list of longs to multiply together.
        Returns:
        The product of the longs in the list.
      • fromString

        public static F<java.lang.String,​Option<java.lang.Long>> fromString()
        A function that converts strings to integers.
        Returns:
        A function that converts strings to integers.