Package fj.function

Class Longs

java.lang.Object
fj.function.Longs

public final class Longs extends Object
Curried functions over Longs.
  • Field Details

    • add

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

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

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

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

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

      public static final F<Long,F<Long,Long>> remainder
      Remainder.
  • Constructor Details

    • Longs

      private Longs()
  • Method Details

    • sum

      public static long sum(List<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<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<String,Option<Long>> fromString()
      A function that converts strings to integers.
      Returns:
      A function that converts strings to integers.