|
Copyright 2008 - 2009 Tony Morris, Runar Bjarnason, Tom Adams, Brad Clow, Ricky Clarkson, Nick Partridge, Jason Zaugg This software is released under an open source BSD licence. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfj.function.Integers
public final class Integers
Curried functions over Integers.
Field Summary | |
---|---|
static F<Integer,Integer> |
abs
Absolute value. |
static F<Integer,F<Integer,Integer>> |
add
Curried Integer addition. |
static F<Integer,Boolean> |
even
Evenness. |
static F<Integer,F<Integer,Integer>> |
multiply
Curried Integer multiplication. |
static F<Integer,Integer> |
negate
Negation. |
static F<Integer,F<Integer,Integer>> |
power
Power. |
static F<Integer,F<Integer,Integer>> |
remainder
Remainder. |
static F<Integer,F<Integer,Integer>> |
subtract
Curried Integer subtraction. |
Method Summary | |
---|---|
static F<String,Option<Integer>> |
fromString()
A function that converts strings to integers. |
static int |
product(List<Integer> ints)
Returns the product of a list of integers. |
static int |
sum(List<Integer> ints)
Sums a list of integers. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final F<Integer,F<Integer,Integer>> add
public static final F<Integer,F<Integer,Integer>> multiply
public static final F<Integer,F<Integer,Integer>> subtract
public static final F<Integer,Integer> negate
public static final F<Integer,Integer> abs
public static final F<Integer,F<Integer,Integer>> remainder
public static final F<Integer,F<Integer,Integer>> power
public static final F<Integer,Boolean> even
Method Detail |
---|
public static int sum(List<Integer> ints)
ints
- A list of integers to sum.
public static int product(List<Integer> ints)
ints
- A list of integers to multiply together.
public static F<String,Option<Integer>> fromString()
|
Copyright 2008 - 2009 Tony Morris, Runar Bjarnason, Tom Adams, Brad Clow, Ricky Clarkson, Nick Partridge, Jason Zaugg This software is released under an open source BSD licence. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |