org.op4j.functions
Class FnInteger

Object
  extended by org.op4j.functions.FnInteger

public final class FnInteger
extends Object

Since:
1.0
Author:
Soraya Sánchez

Method Summary
static Function<Integer,Integer> abs()
           It returns the absolute value of the input
static Function<Integer,Integer> add(byte add)
           It adds the given number to the target and returns the result
static Function<Integer,Integer> add(double add)
           It adds the given number to the target and returns the result
static Function<Integer,Integer> add(float add)
           It adds the given number to the target and returns the result
static Function<Integer,Integer> add(int add)
           It adds the given number to the target and returns the result
static Function<Integer,Integer> add(long add)
           It adds the given number to the target and returns the result
static Function<Integer,Integer> add(Number add)
           It adds the given number to the target and returns the result
static Function<Integer,Integer> add(short add)
           It adds the given number to the target and returns the result
static Function<Iterable<Integer>,Integer> avg()
           It returns the average of all the numbers in the Iterable input object
static Function<Iterable<Integer>,Integer> avg(MathContext mathContext)
           It returns the average of all the numbers in the Iterable input object.
static Function<Iterable<Integer>,Integer> avg(RoundingMode roundingMode)
           It returns the average of all the numbers in the Iterable input object.
static Function<Integer[],Integer> avgArray()
           It returns the average of all the numbers in the input array
static Function<Integer[],Integer> avgArray(MathContext mathContext)
           It returns the average of all the numbers in the input array.
static Function<Integer[],Integer> avgArray(RoundingMode roundingMode)
           It returns the average of all the numbers in the input array.
static Function<Integer,Boolean> between(int min, int max)
           Determines whether the target object is between min and max in value, this is, whether target.compareTo(min) >= 0 && target.compareTo(max) <= 0.
static Function<Integer,Boolean> between(Number min, Number max)
           Determines whether the target object is between min and max in value, this is, whether target.compareTo(min) >= 0 && target.compareTo(max) <= 0.
static Function<Integer,Integer> divideBy(byte divisor)
           It divides the target element by the given divisor and returns its result
static Function<Integer,Integer> divideBy(byte divisor, MathContext mathContext)
           It divides the target element by the given divisor and returns its result with the precision and rounding mode specified by mathContext
static Function<Integer,Integer> divideBy(byte divisor, RoundingMode roundingMode)
           It divides the target element by the given divisor and returns its result rounded based on the specified rounding mode
static Function<Integer,Integer> divideBy(double divisor)
           It divides the target element by the given divisor and returns its result
static Function<Integer,Integer> divideBy(double divisor, MathContext mathContext)
           It divides the target element by the given divisor and returns its result with the precision and rounding mode specified by mathContext
static Function<Integer,Integer> divideBy(double divisor, RoundingMode roundingMode)
           It divides the target element by the given divisor and returns its result rounded based on the specified rounding mode
static Function<Integer,Integer> divideBy(float divisor)
           It divides the target element by the given divisor and returns its result
static Function<Integer,Integer> divideBy(float divisor, MathContext mathContext)
           It divides the target element by the given divisor and returns its result with the precision and rounding mode specified by mathContext
static Function<Integer,Integer> divideBy(float divisor, RoundingMode roundingMode)
           It divides the target element by the given divisor and returns its result rounded based on the specified rounding mode
static Function<Integer,Integer> divideBy(int divisor)
           It divides the target element by the given divisor and returns its result
static Function<Integer,Integer> divideBy(int divisor, MathContext mathContext)
           It divides the target element by the given divisor and returns its result with the precision and rounding mode specified by mathContext
static Function<Integer,Integer> divideBy(int divisor, RoundingMode roundingMode)
           It divides the target element by the given divisor and returns its result rounded based on the specified rounding mode
static Function<Integer,Integer> divideBy(long divisor)
           It divides the target element by the given divisor and returns its result
static Function<Integer,Integer> divideBy(long divisor, MathContext mathContext)
           It divides the target element by the given divisor and returns its result with the precision and rounding mode specified by mathContext
static Function<Integer,Integer> divideBy(long divisor, RoundingMode roundingMode)
           It divides the target element by the given divisor and returns its result rounded based on the specified rounding mode
static Function<Integer,Integer> divideBy(Number divisor)
           It divides the target element by the given divisor and returns its result
static Function<Integer,Integer> divideBy(Number divisor, MathContext mathContext)
           It divides the target element by the given divisor and returns its result with the precision and rounding mode specified by mathContext
static Function<Integer,Integer> divideBy(Number divisor, RoundingMode roundingMode)
           It divides the target element by the given divisor and returns its result rounded based on the specified rounding mode
static Function<Integer,Integer> divideBy(short divisor)
           It divides the target element by the given divisor and returns its result
static Function<Integer,Integer> divideBy(short divisor, MathContext mathContext)
           It divides the target element by the given divisor and returns its result with the precision and rounding mode specified by mathContext
static Function<Integer,Integer> divideBy(short divisor, RoundingMode roundingMode)
           It divides the target element by the given divisor and returns its result rounded based on the specified rounding mode
static Function<Integer,Boolean> eq(int object)
           Determines whether the target object and the specified object are equal by calling the equals method on the target object.
static Function<Integer,Boolean> eq(Integer object)
           Determines whether the target object and the specified object are equal by calling the equals method on the target object.
static Function<Integer,Boolean> eqBy(IFunction<Integer,?> by, Object object)
           Determines whether the result of executing the specified function on the target object and the specified object parameter are equal by calling the equals method.
static Function<Integer,Boolean> eqValue(int object)
           Determines whether the target object and the specified object are equal in value, this is, whether target.compareTo(object) == 0.
static Function<Integer,Boolean> eqValue(Number object)
           Determines whether the target object and the specified object are equal in value, this is, whether target.compareTo(object) == 0.
static Function<Integer,Boolean> eqValueBy(IFunction<Integer,?> by, Object object)
           Determines whether the result of executing the specified function on the target object and the specified object parameter are equal in value, this is, whether functionResult.compareTo(object) == 0.
static Function<Integer,Boolean> greaterOrEqTo(int object)
           Determines whether the target object is greater or equal to the specified object in value, this is, whether target.compareTo(object) >= 0.
static Function<Integer,Boolean> greaterOrEqTo(Number object)
           Determines whether the target object is greater or equal to the specified object in value, this is, whether target.compareTo(object) >= 0.
static Function<Integer,Boolean> greaterOrEqToBy(IFunction<Integer,?> by, Object object)
           Determines whether the result of executing the specified function on the target object is greater or equal to the specified object parameter in value, this is, whether functionResult.compareTo(object) >= 0.
static Function<Integer,Boolean> greaterThan(int object)
           Determines whether the target object is greater than the specified object in value, this is, whether target.compareTo(object) > 0.
static Function<Integer,Boolean> greaterThan(Number object)
           Determines whether the target object is greater than the specified object in value, this is, whether target.compareTo(object) > 0.
static Function<Integer,Boolean> greaterThanBy(IFunction<Integer,?> by, Object object)
           Determines whether the result of executing the specified function on the target object is greater than the specified object parameter in value, this is, whether functionResult.compareTo(object) > 0.
static Function<Integer,Boolean> isNotNull()
           Determines whether the target object is null or not.
static Function<Integer,Boolean> isNull()
           Determines whether the target object is null or not.
static Function<Integer,Boolean> lessOrEqTo(int object)
           Determines whether the target object is less or equal to the specified object in value, this is, whether target.compareTo(object) <= 0.
static Function<Integer,Boolean> lessOrEqTo(Number object)
           Determines whether the target object is less or equal to the specified object in value, this is, whether target.compareTo(object) <= 0.
static Function<Integer,Boolean> lessOrEqToBy(IFunction<Integer,?> by, Object object)
           Determines whether the result of executing the specified function on the target object is less or equal to the specified object parameter in value, this is, whether functionResult.compareTo(object) <= 0.
static Function<Integer,Boolean> lessThan(int object)
           Determines whether the target object is less than the specified object in value, this is, whether target.compareTo(object) < 0.
static Function<Integer,Boolean> lessThan(Number object)
           Determines whether the target object is less than the specified object in value, this is, whether target.compareTo(object) < 0.
static Function<Integer,Boolean> lessThanBy(IFunction<Integer,?> by, Object object)
           Determines whether the result of executing the specified function on the target object is less than the specified object parameter in value, this is, whether functionResult.compareTo(object) < 0.
static Function<Iterable<Integer>,Integer> max()
           It returns the maximum number from an Iterable input object
static Function<Integer[],Integer> maxArray()
           It returns the maximum number from the input array
static Function<Iterable<Integer>,Integer> min()
           It returns the minimum number from an Iterable input object
static Function<Integer[],Integer> minArray()
           It returns the minimum number from the input array
static Function<Integer,Integer> module(BigInteger module)
           It performs a module operation and returns the value of (input mod module) which is always positive (whereas remainder is not)
static Function<Integer,Integer> module(byte module)
           It performs a module operation and returns the value of (input mod module) which is always positive (whereas remainder is not)
static Function<Integer,Integer> module(Byte module)
           It performs a module operation and returns the value of (input mod module) which is always positive (whereas remainder is not)
static Function<Integer,Integer> module(int module)
           It performs a module operation and returns the value of (input mod module) which is always positive (whereas remainder is not)
static Function<Integer,Integer> module(Integer module)
           It performs a module operation and returns the value of (input mod module) which is always positive (whereas remainder is not)
static Function<Integer,Integer> module(long module)
           It performs a module operation and returns the value of (input mod module) which is always positive (whereas remainder is not)
static Function<Integer,Integer> module(Long module)
           It performs a module operation and returns the value of (input mod module) which is always positive (whereas remainder is not)
static Function<Integer,Integer> module(short module)
           It performs a module operation and returns the value of (input mod module) which is always positive (whereas remainder is not)
static Function<Integer,Integer> module(Short module)
           It performs a module operation and returns the value of (input mod module) which is always positive (whereas remainder is not)
static Function<Integer,Integer> multiplyBy(byte multiplicand)
           It multiplies target by multiplicand and returns its value
static Function<Integer,Integer> multiplyBy(byte multiplicand, MathContext mathContext)
           It multiplies target by multiplicand and returns its value.
static Function<Integer,Integer> multiplyBy(byte multiplicand, RoundingMode roundingMode)
           It multiplies target by multiplicand and returns its value.
static Function<Integer,Integer> multiplyBy(double multiplicand)
           It multiplies target by multiplicand and returns its value
static Function<Integer,Integer> multiplyBy(double multiplicand, MathContext mathContext)
           It multiplies target by multiplicand and returns its value.
static Function<Integer,Integer> multiplyBy(double multiplicand, RoundingMode roundingMode)
           It multiplies target by multiplicand and returns its value.
static Function<Integer,Integer> multiplyBy(float multiplicand)
           It multiplies target by multiplicand and returns its value
static Function<Integer,Integer> multiplyBy(float multiplicand, MathContext mathContext)
           It multiplies target by multiplicand and returns its value.
static Function<Integer,Integer> multiplyBy(float multiplicand, RoundingMode roundingMode)
           It multiplies target by multiplicand and returns its value.
static Function<Integer,Integer> multiplyBy(int multiplicand)
           It multiplies target by multiplicand and returns its value
static Function<Integer,Integer> multiplyBy(int multiplicand, MathContext mathContext)
           It multiplies target by multiplicand and returns its value.
static Function<Integer,Integer> multiplyBy(int multiplicand, RoundingMode roundingMode)
           It multiplies target by multiplicand and returns its value.
static Function<Integer,Integer> multiplyBy(long multiplicand)
           It multiplies target by multiplicand and returns its value
static Function<Integer,Integer> multiplyBy(long multiplicand, MathContext mathContext)
           It multiplies target by multiplicand and returns its value.
static Function<Integer,Integer> multiplyBy(long multiplicand, RoundingMode roundingMode)
           It multiplies target by multiplicand and returns its value.
static Function<Integer,Integer> multiplyBy(Number multiplicand)
           It multiplies target by multiplicand and returns its value
static Function<Integer,Integer> multiplyBy(Number multiplicand, MathContext mathContext)
           It multiplies target by multiplicand and returns its value.
static Function<Integer,Integer> multiplyBy(Number multiplicand, RoundingMode roundingMode)
           It multiplies target by multiplicand and returns its value.
static Function<Integer,Integer> multiplyBy(short multiplicand)
           It multiplies target by multiplicand and returns its value
static Function<Integer,Integer> multiplyBy(short multiplicand, MathContext mathContext)
           It multiplies target by multiplicand and returns its value.
static Function<Integer,Integer> multiplyBy(short multiplicand, RoundingMode roundingMode)
           It multiplies target by multiplicand and returns its value.
static Function<Integer,Boolean> notEq(int object)
           Determines whether the target object and the specified object are NOT equal by calling the equals method on the target object.
static Function<Integer,Boolean> notEq(Integer object)
           Determines whether the target object and the specified object are NOT equal by calling the equals method on the target object.
static Function<Integer,Boolean> notEqBy(IFunction<Integer,?> by, Object object)
           Determines whether the result of executing the specified function on the target object and the specified object parameter are NOT equal by calling the equals method.
static Function<Integer,Boolean> notEqValue(int object)
           Determines whether the target object and the specified object are NOT equal in value, this is, whether target.compareTo(object) !
static Function<Integer,Boolean> notEqValue(Number object)
           Determines whether the target object and the specified object are NOT equal in value, this is, whether target.compareTo(object) !
static Function<Integer,Boolean> notEqValueBy(IFunction<Integer,?> by, Object object)
           Determines whether the result of executing the specified function on the target object and the specified object parameter are NOT equal in value, this is, whether functionResult.compareTo(object) !
static Function<Integer,Integer> pow(int power)
           It performs the operation targetpower and returns its value
static Function<Integer,Integer> pow(int power, MathContext mathContext)
           It performs the operation targetpower and returns its value.
static Function<Integer,Integer> pow(int power, RoundingMode roundingMode)
           It performs the operation targetpower and returns its value.
static Function<Integer,Integer> remainder(byte divisor)
           It divides the target element by the given divisor and returns the remainder (target % divisor)
static Function<Integer,Integer> remainder(double divisor)
           It divides the target element by the given divisor and returns the remainder (target % divisor)
static Function<Integer,Integer> remainder(float divisor)
           It divides the target element by the given divisor and returns the remainder (target % divisor)
static Function<Integer,Integer> remainder(int divisor)
           It divides the target element by the given divisor and returns the remainder (target % divisor)
static Function<Integer,Integer> remainder(long divisor)
           It divides the target element by the given divisor and returns the remainder (target % divisor)
static Function<Integer,Integer> remainder(Number divisor)
           It divides the target element by the given divisor and returns the remainder (target % divisor)
static Function<Integer,Integer> remainder(short divisor)
           It divides the target element by the given divisor and returns the remainder (target % divisor)
static Function<Integer,Integer> subtract(byte subtract)
           It subtracts the given number from the target and returns the result
static Function<Integer,Integer> subtract(double subtract)
           It subtracts the given number from the target and returns the result
static Function<Integer,Integer> subtract(float subtract)
           It subtracts the given number from the target and returns the result
static Function<Integer,Integer> subtract(int subtract)
           It subtracts the given number from the target and returns the result
static Function<Integer,Integer> subtract(long subtract)
           It subtracts the given number from the target and returns the result
static Function<Integer,Integer> subtract(Number subtract)
           It subtracts the given number from the target and returns the result
static Function<Integer,Integer> subtract(short subtract)
           It subtracts the given number from the target and returns the result
static Function<Iterable<Integer>,Integer> sum()
           It returns the sum of all the numbers in the Iterable input object
static Function<Integer[],Integer> sumArray()
           It returns the sum of all the numbers in the input array
static Function<Integer,String> toCurrencyStr()
           It returns the String representation of the target as a currency in the default Locale
static Function<Integer,String> toCurrencyStr(boolean groupingUsed)
           It returns the String representation of the target as a currency in the default Locale
static Function<Integer,String> toCurrencyStr(Locale locale)
           It returns the String representation of the target as a currency in the given Locale
static Function<Integer,String> toCurrencyStr(Locale locale, boolean groupingUsed)
           It returns the String representation of the target as a currency in the given Locale
static Function<Integer,String> toCurrencyStr(String locale)
           It returns the String representation of the target as a currency in the given locale
static Function<Integer,String> toCurrencyStr(String locale, boolean groupingUsed)
           It returns the String representation of the target as a currency in the given locale
static Function<Integer,String> toPercentStr()
           A String representing a percentage is created from the target number.
static Function<Integer,String> toPercentStr(boolean groupingUsed)
           A String representing a percentage is created from the target number either using grouping or not depending on the given parameter.
static Function<Integer,String> toPercentStr(Locale locale)
           A String representing a percentage is created from the target number in the given Locale
static Function<Integer,String> toPercentStr(Locale locale, boolean groupingUsed)
           A String representing a percentage is created from the target number in the given Locale.
static Function<Integer,String> toPercentStr(String locale)
           A String representing a percentage is created from the target number in the given locale
static Function<Integer,String> toPercentStr(String locale, boolean groupingUsed)
           A String representing a percentage is created from the target number in the given locale.
static Function<Integer,String> toStr()
           It returns the String representation of the input number
static Function<Integer,String> toStr(boolean groupingUsed)
           It returns the String representation of the input number either using or not using grouping
static Function<Integer,String> toStr(Locale locale)
           It returns the String representation of the target number in the given Locale
static Function<Integer,String> toStr(Locale locale, boolean groupingUsed)
           It returns the String representation of the target number in the given Locale.
static Function<Integer,String> toStr(String locale)
           It returns the String representation of the target number in the given locale
static Function<Integer,String> toStr(String locale, boolean groupingUsed)
           It returns the String representation of the target number in the given locale.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toStr

public static final Function<Integer,String> toStr()

It returns the String representation of the input number

Returns:
the String representation of the input

toStr

public static final Function<Integer,String> toStr(boolean groupingUsed)

It returns the String representation of the input number either using or not using grouping

Parameters:
groupingUsed - whether or not grouping will be used
Returns:
the String representation of the input

toStr

public static final Function<Integer,String> toStr(Locale locale)

It returns the String representation of the target number in the given Locale

Parameters:
locale - the Locale to be used
Returns:
the String representation of the input

toStr

public static final Function<Integer,String> toStr(String locale)

It returns the String representation of the target number in the given locale

Parameters:
locale - the locale to be used
Returns:
the String representation of the input

toStr

public static final Function<Integer,String> toStr(Locale locale,
                                                   boolean groupingUsed)

It returns the String representation of the target number in the given Locale. Grouping will be used depending on the value of the groupingUsed parameter

Parameters:
locale - the Locale to be used
groupingUsed - whether or not grouping will be used
Returns:
the String representation of the input

toStr

public static final Function<Integer,String> toStr(String locale,
                                                   boolean groupingUsed)

It returns the String representation of the target number in the given locale. Grouping will be used depending on the value of the groupingUsed parameter

Parameters:
locale - the locale to be used
groupingUsed - whether or not grouping will be used
Returns:
the String representation of the input

toCurrencyStr

public static final Function<Integer,String> toCurrencyStr()

It returns the String representation of the target as a currency in the default Locale

Returns:
the String representation of the input as a currency

toCurrencyStr

public static final Function<Integer,String> toCurrencyStr(boolean groupingUsed)

It returns the String representation of the target as a currency in the default Locale

Parameters:
groupingUsed - whether or not grouping will be used
Returns:
the String representation of the input as a currency

toCurrencyStr

public static final Function<Integer,String> toCurrencyStr(Locale locale)

It returns the String representation of the target as a currency in the given Locale

Parameters:
locale - the Locale to be used
Returns:
the String representation of the input as a currency

toCurrencyStr

public static final Function<Integer,String> toCurrencyStr(String locale)

It returns the String representation of the target as a currency in the given locale

Parameters:
locale - the locale to be used
Returns:
the String representation of the input as a currency

toCurrencyStr

public static final Function<Integer,String> toCurrencyStr(Locale locale,
                                                           boolean groupingUsed)

It returns the String representation of the target as a currency in the given Locale

Parameters:
locale - the Locale to be used
groupingUsed - whether or not grouping will be used
Returns:
the String representation of the input as a currency

toCurrencyStr

public static final Function<Integer,String> toCurrencyStr(String locale,
                                                           boolean groupingUsed)

It returns the String representation of the target as a currency in the given locale

Parameters:
locale - the locale to be used
groupingUsed - whether or not grouping will be used
Returns:
the String representation of the input as a currency

toPercentStr

public static final Function<Integer,String> toPercentStr()

A String representing a percentage is created from the target number.

Returns:
the string representation of the input number as a percentage

toPercentStr

public static final Function<Integer,String> toPercentStr(boolean groupingUsed)

A String representing a percentage is created from the target number either using grouping or not depending on the given parameter. So,

toPercentStr(true) would return 100,000% if target number is 1000
toPercentStr(false) would return 100000% if target number is 1000

Parameters:
groupingUsed - whether or not grouping will be used
Returns:
the string representation of the input number as a percentage

toPercentStr

public static final Function<Integer,String> toPercentStr(Locale locale)

A String representing a percentage is created from the target number in the given Locale

Parameters:
locale - the Locale to be used
Returns:
the string representation of the input number as a percentage

toPercentStr

public static final Function<Integer,String> toPercentStr(String locale)

A String representing a percentage is created from the target number in the given locale

Parameters:
locale - the locale to be used
Returns:
the string representation of the input number as a percentage

toPercentStr

public static final Function<Integer,String> toPercentStr(Locale locale,
                                                          boolean groupingUsed)

A String representing a percentage is created from the target number in the given Locale. Grouping will be used depending on the value of the groupingUsed parameter.

Parameters:
locale - the Locale to be used
groupingUsed - whether or not grouping will be used
Returns:
the string representation of the input number as a percentage

toPercentStr

public static final Function<Integer,String> toPercentStr(String locale,
                                                          boolean groupingUsed)

A String representing a percentage is created from the target number in the given locale. Grouping will be used depending on the value of the groupingUsed parameter.

Parameters:
locale - the locale to be used
groupingUsed - whether or not grouping will be used
Returns:
the string representation of the input number as a percentage

eq

public static final Function<Integer,Boolean> eq(Integer object)

Determines whether the target object and the specified object are equal by calling the equals method on the target object.

Parameters:
object - the Integer to compare to the target
Returns:
true if both objects are equal, false if not.

eq

public static final Function<Integer,Boolean> eq(int object)

Determines whether the target object and the specified object are equal by calling the equals method on the target object.

Parameters:
object - the object to compare to the target
Returns:
true if both objects are equal, false if not.

eqValue

public static final Function<Integer,Boolean> eqValue(Number object)

Determines whether the target object and the specified object are equal in value, this is, whether target.compareTo(object) == 0. Both the target and the specified object have to implement Comparable.

Parameters:
object - the object to compare to the target
Returns:
true if both objects are equal according to "compareTo", false if not.

eqValue

public static final Function<Integer,Boolean> eqValue(int object)

Determines whether the target object and the specified object are equal in value, this is, whether target.compareTo(object) == 0. Both the target and the specified object have to implement Comparable.

Parameters:
object - the object to compare to the target
Returns:
true if both objects are equal according to "compareTo", false if not.

notEq

public static final Function<Integer,Boolean> notEq(Integer object)

Determines whether the target object and the specified object are NOT equal by calling the equals method on the target object.

Parameters:
object - the Integer to compare to the target
Returns:
false if both objects are equal, true if not.

notEq

public static final Function<Integer,Boolean> notEq(int object)

Determines whether the target object and the specified object are NOT equal by calling the equals method on the target object.

Parameters:
object - the object to compare to the target
Returns:
false if both objects are equal, true if not.

notEqValue

public static final Function<Integer,Boolean> notEqValue(Number object)

Determines whether the target object and the specified object are NOT equal in value, this is, whether target.compareTo(object) != 0. Both the target and the specified object have to implement Comparable.

Parameters:
object - the object to compare to the target
Returns:
false if both objects are equal according to "compareTo", true if not.

notEqValue

public static final Function<Integer,Boolean> notEqValue(int object)

Determines whether the target object and the specified object are NOT equal in value, this is, whether target.compareTo(object) != 0. Both the target and the specified object have to implement Comparable.

Parameters:
object - the object to compare to the target
Returns:
false if both objects are equal according to "compareTo", true if not.

lessThan

public static final Function<Integer,Boolean> lessThan(Number object)

Determines whether the target object is less than the specified object in value, this is, whether target.compareTo(object) < 0. Both the target and the specified object have to implement Comparable.

Parameters:
object - the object to compare to the target
Returns:
true if target is less than the specified object, false if not

lessThan

public static final Function<Integer,Boolean> lessThan(int object)

Determines whether the target object is less than the specified object in value, this is, whether target.compareTo(object) < 0. Both the target and the specified object have to implement Comparable.

Parameters:
object - the object to compare to the target
Returns:
true if target is less than the specified object, false if not

lessOrEqTo

public static final Function<Integer,Boolean> lessOrEqTo(Number object)

Determines whether the target object is less or equal to the specified object in value, this is, whether target.compareTo(object) <= 0. Both the target and the specified object have to implement Comparable.

Parameters:
object - the object to compare to the target
Returns:
true if target is less or equal to the specified object, false if not

lessOrEqTo

public static final Function<Integer,Boolean> lessOrEqTo(int object)

Determines whether the target object is less or equal to the specified object in value, this is, whether target.compareTo(object) <= 0. Both the target and the specified object have to implement Comparable.

Parameters:
object - the object to compare to the target
Returns:
true if target is less or equal to the specified object, false if not

greaterThan

public static final Function<Integer,Boolean> greaterThan(Number object)

Determines whether the target object is greater than the specified object in value, this is, whether target.compareTo(object) > 0. Both the target and the specified object have to implement Comparable.

Parameters:
object - the object to compare to the target
Returns:
true if target is greater than the specified object, false if not

greaterThan

public static final Function<Integer,Boolean> greaterThan(int object)

Determines whether the target object is greater than the specified object in value, this is, whether target.compareTo(object) > 0. Both the target and the specified object have to implement Comparable.

Parameters:
object - the object to compare to the target
Returns:
true if target is greater than the specified object, false if not

greaterOrEqTo

public static final Function<Integer,Boolean> greaterOrEqTo(Number object)

Determines whether the target object is greater or equal to the specified object in value, this is, whether target.compareTo(object) >= 0. Both the target and the specified object have to implement Comparable.

Parameters:
object - the object to compare to the target
Returns:
true if target is greater or equal to the specified object, false if not

greaterOrEqTo

public static final Function<Integer,Boolean> greaterOrEqTo(int object)

Determines whether the target object is greater or equal to the specified object in value, this is, whether target.compareTo(object) >= 0. Both the target and the specified object have to implement Comparable.

Parameters:
object - the object to compare to the target
Returns:
true if target is greater or equal to the specified object, false if not

eqBy

public static final Function<Integer,Boolean> eqBy(IFunction<Integer,?> by,
                                                   Object object)

Determines whether the result of executing the specified function on the target object and the specified object parameter are equal by calling the equals method.

Parameters:
object - the object to compare to the target
Returns:
true if both objects are equal, false if not.
Since:
1.1

eqValueBy

public static final Function<Integer,Boolean> eqValueBy(IFunction<Integer,?> by,
                                                        Object object)

Determines whether the result of executing the specified function on the target object and the specified object parameter are equal in value, this is, whether functionResult.compareTo(object) == 0. Both the function result and the specified object have to implement Comparable.

Parameters:
object - the object to compare to the target
Returns:
true if both objects are equal according to "compareTo", false if not.
Since:
1.1

notEqBy

public static final Function<Integer,Boolean> notEqBy(IFunction<Integer,?> by,
                                                      Object object)

Determines whether the result of executing the specified function on the target object and the specified object parameter are NOT equal by calling the equals method.

Parameters:
object - the object to compare to the target
Returns:
false if both objects are equal, true if not.
Since:
1.1

notEqValueBy

public static final Function<Integer,Boolean> notEqValueBy(IFunction<Integer,?> by,
                                                           Object object)

Determines whether the result of executing the specified function on the target object and the specified object parameter are NOT equal in value, this is, whether functionResult.compareTo(object) != 0. Both the function result and the specified object have to implement Comparable.

Parameters:
object - the object to compare to the target
Returns:
false if both objects are equal according to "compareTo", true if not.
Since:
1.1

lessThanBy

public static final Function<Integer,Boolean> lessThanBy(IFunction<Integer,?> by,
                                                         Object object)

Determines whether the result of executing the specified function on the target object is less than the specified object parameter in value, this is, whether functionResult.compareTo(object) < 0. Both the target and the specified object have to implement Comparable.

Parameters:
object - the object to compare to the target
Returns:
true if function result is less than the specified object, false if not
Since:
1.1

lessOrEqToBy

public static final Function<Integer,Boolean> lessOrEqToBy(IFunction<Integer,?> by,
                                                           Object object)

Determines whether the result of executing the specified function on the target object is less or equal to the specified object parameter in value, this is, whether functionResult.compareTo(object) <= 0. Both the target and the specified object have to implement Comparable.

Parameters:
object - the object to compare to the target
Returns:
true if function result is less or equal to the specified object, false if not
Since:
1.1

greaterThanBy

public static final Function<Integer,Boolean> greaterThanBy(IFunction<Integer,?> by,
                                                            Object object)

Determines whether the result of executing the specified function on the target object is greater than the specified object parameter in value, this is, whether functionResult.compareTo(object) > 0. Both the target and the specified object have to implement Comparable.

Parameters:
object - the object to compare to the target
Returns:
true if function result is greater than the specified object, false if not
Since:
1.1

greaterOrEqToBy

public static final Function<Integer,Boolean> greaterOrEqToBy(IFunction<Integer,?> by,
                                                              Object object)

Determines whether the result of executing the specified function on the target object is greater or equal to the specified object parameter in value, this is, whether functionResult.compareTo(object) >= 0. Both the target and the specified object have to implement Comparable.

Parameters:
object - the object to compare to the target
Returns:
true if function result is greater or equal to the specified object, false if not
Since:
1.1

isNull

public static final Function<Integer,Boolean> isNull()

Determines whether the target object is null or not.

Returns:
true if the target object is null, false if not.

isNotNull

public static final Function<Integer,Boolean> isNotNull()

Determines whether the target object is null or not.

Returns:
false if the target object is null, true if not.

max

public static final Function<Iterable<Integer>,Integer> max()

It returns the maximum number from an Iterable input object

Returns:
the maximum number

min

public static final Function<Iterable<Integer>,Integer> min()

It returns the minimum number from an Iterable input object

Returns:
the minimum number

sum

public static final Function<Iterable<Integer>,Integer> sum()

It returns the sum of all the numbers in the Iterable input object

Returns:
a number equal to the sum of all the elements in the input Iterable

avg

public static final Function<Iterable<Integer>,Integer> avg()

It returns the average of all the numbers in the Iterable input object

Returns:
a number representing the average of the input numbers

avg

public static final Function<Iterable<Integer>,Integer> avg(MathContext mathContext)

It returns the average of all the numbers in the Iterable input object. The given MathContext will be used to round and set the output precision

Parameters:
mathContext - the MathContext to define RoundingMode and precision of the average
Returns:
a number representing the average

avg

public static final Function<Iterable<Integer>,Integer> avg(RoundingMode roundingMode)

It returns the average of all the numbers in the Iterable input object. The given RoundingMode will be used to round the output

Parameters:
roundingMode - the RoundingMode to round the average
Returns:
a number representing the average

maxArray

public static final Function<Integer[],Integer> maxArray()

It returns the maximum number from the input array

Returns:
the maximum number

minArray

public static final Function<Integer[],Integer> minArray()

It returns the minimum number from the input array

Returns:
the minimum number

sumArray

public static final Function<Integer[],Integer> sumArray()

It returns the sum of all the numbers in the input array

Returns:
a number equal to the sum of all the elements in the input array

avgArray

public static final Function<Integer[],Integer> avgArray()

It returns the average of all the numbers in the input array

Returns:
a number representing the average of the input numbers

avgArray

public static final Function<Integer[],Integer> avgArray(MathContext mathContext)

It returns the average of all the numbers in the input array. The given MathContext will be used to round and set the output precision

Parameters:
mathContext - the MathContext to define RoundingMode and precision of the average
Returns:
a number representing the average

avgArray

public static final Function<Integer[],Integer> avgArray(RoundingMode roundingMode)

It returns the average of all the numbers in the input array. The given RoundingMode will be used to round the output

Parameters:
roundingMode - the RoundingMode to round the average
Returns:
a number representing the average

abs

public static final Function<Integer,Integer> abs()

It returns the absolute value of the input

Returns:
the absolute value of the input

add

public static final Function<Integer,Integer> add(Number add)

It adds the given number to the target and returns the result

Parameters:
add - value to be added to the target
Returns:
the result of the addition of add to the target number

add

public static final Function<Integer,Integer> add(byte add)

It adds the given number to the target and returns the result

Parameters:
add - value to be added to the target
Returns:
the result of the addition of add to the target number

add

public static final Function<Integer,Integer> add(short add)

It adds the given number to the target and returns the result

Parameters:
add - value to be added to the target
Returns:
the result of the addition of add to the target number

add

public static final Function<Integer,Integer> add(int add)

It adds the given number to the target and returns the result

Parameters:
add - value to be added to the target
Returns:
the result of the addition of add to the target number

add

public static final Function<Integer,Integer> add(long add)

It adds the given number to the target and returns the result

Parameters:
add - value to be added to the target
Returns:
the result of the addition of add to the target number

add

public static final Function<Integer,Integer> add(float add)

It adds the given number to the target and returns the result

Parameters:
add - value to be added to the target
Returns:
the result of the addition of add to the target number

add

public static final Function<Integer,Integer> add(double add)

It adds the given number to the target and returns the result

Parameters:
add - value to be added to the target
Returns:
the result of the addition of add to the target number

subtract

public static final Function<Integer,Integer> subtract(Number subtract)

It subtracts the given number from the target and returns the result

Parameters:
subtract - number to be subtracted from the target
Returns:
the result of the subtraction

subtract

public static final Function<Integer,Integer> subtract(byte subtract)

It subtracts the given number from the target and returns the result

Parameters:
subtract - number to be subtracted from the target
Returns:
the result of the subtraction

subtract

public static final Function<Integer,Integer> subtract(short subtract)

It subtracts the given number from the target and returns the result

Parameters:
subtract - number to be subtracted from the target
Returns:
the result of the subtraction

subtract

public static final Function<Integer,Integer> subtract(int subtract)

It subtracts the given number from the target and returns the result

Parameters:
subtract - number to be subtracted from the target
Returns:
the result of the subtraction

subtract

public static final Function<Integer,Integer> subtract(long subtract)

It subtracts the given number from the target and returns the result

Parameters:
subtract - number to be subtracted from the target
Returns:
the result of the subtraction

subtract

public static final Function<Integer,Integer> subtract(float subtract)

It subtracts the given number from the target and returns the result

Parameters:
subtract - number to be subtracted from the target
Returns:
the result of the subtraction

subtract

public static final Function<Integer,Integer> subtract(double subtract)

It subtracts the given number from the target and returns the result

Parameters:
subtract - number to be subtracted from the target
Returns:
the result of the subtraction

divideBy

public static final Function<Integer,Integer> divideBy(Number divisor)

It divides the target element by the given divisor and returns its result

Parameters:
divisor - the divisor
Returns:
the result of target/divisor

divideBy

public static final Function<Integer,Integer> divideBy(byte divisor)

It divides the target element by the given divisor and returns its result

Parameters:
divisor - the divisor
Returns:
the result of target/divisor

divideBy

public static final Function<Integer,Integer> divideBy(short divisor)

It divides the target element by the given divisor and returns its result

Parameters:
divisor - the divisor
Returns:
the result of target/divisor

divideBy

public static final Function<Integer,Integer> divideBy(int divisor)

It divides the target element by the given divisor and returns its result

Parameters:
divisor - the divisor
Returns:
the result of target/divisor

divideBy

public static final Function<Integer,Integer> divideBy(long divisor)

It divides the target element by the given divisor and returns its result

Parameters:
divisor - the divisor
Returns:
the result of target/divisor

divideBy

public static final Function<Integer,Integer> divideBy(float divisor)

It divides the target element by the given divisor and returns its result

Parameters:
divisor - the divisor
Returns:
the result of target/divisor

divideBy

public static final Function<Integer,Integer> divideBy(double divisor)

It divides the target element by the given divisor and returns its result

Parameters:
divisor - the divisor
Returns:
the result of target/divisor

divideBy

public static final Function<Integer,Integer> divideBy(Number divisor,
                                                       MathContext mathContext)

It divides the target element by the given divisor and returns its result with the precision and rounding mode specified by mathContext

Parameters:
divisor - the divisor
mathContext - the MathContext to define RoundingMode and precision
Returns:
the result of target/divisor

divideBy

public static final Function<Integer,Integer> divideBy(byte divisor,
                                                       MathContext mathContext)

It divides the target element by the given divisor and returns its result with the precision and rounding mode specified by mathContext

Parameters:
divisor - the divisor
mathContext - the MathContext to define RoundingMode and precision
Returns:
the result of target/divisor

divideBy

public static final Function<Integer,Integer> divideBy(short divisor,
                                                       MathContext mathContext)

It divides the target element by the given divisor and returns its result with the precision and rounding mode specified by mathContext

Parameters:
divisor - the divisor
mathContext - the MathContext to define RoundingMode and precision
Returns:
the result of target/divisor

divideBy

public static final Function<Integer,Integer> divideBy(int divisor,
                                                       MathContext mathContext)

It divides the target element by the given divisor and returns its result with the precision and rounding mode specified by mathContext

Parameters:
divisor - the divisor
mathContext - the MathContext to define RoundingMode and precision
Returns:
the result of target/divisor

divideBy

public static final Function<Integer,Integer> divideBy(long divisor,
                                                       MathContext mathContext)

It divides the target element by the given divisor and returns its result with the precision and rounding mode specified by mathContext

Parameters:
divisor - the divisor
mathContext - the MathContext to define RoundingMode and precision
Returns:
the result of target/divisor

divideBy

public static final Function<Integer,Integer> divideBy(float divisor,
                                                       MathContext mathContext)

It divides the target element by the given divisor and returns its result with the precision and rounding mode specified by mathContext

Parameters:
divisor - the divisor
mathContext - the MathContext to define RoundingMode and precision
Returns:
the result of target/divisor

divideBy

public static final Function<Integer,Integer> divideBy(double divisor,
                                                       MathContext mathContext)

It divides the target element by the given divisor and returns its result with the precision and rounding mode specified by mathContext

Parameters:
divisor - the divisor
mathContext - the MathContext to define RoundingMode and precision
Returns:
the result of target/divisor

divideBy

public static final Function<Integer,Integer> divideBy(Number divisor,
                                                       RoundingMode roundingMode)

It divides the target element by the given divisor and returns its result rounded based on the specified rounding mode

Parameters:
divisor - the divisor
roundingMode - the RoundingMode
Returns:
the result of target/divisor

divideBy

public static final Function<Integer,Integer> divideBy(byte divisor,
                                                       RoundingMode roundingMode)

It divides the target element by the given divisor and returns its result rounded based on the specified rounding mode

Parameters:
divisor - the divisor
roundingMode - the RoundingMode
Returns:
the result of target/divisor

divideBy

public static final Function<Integer,Integer> divideBy(short divisor,
                                                       RoundingMode roundingMode)

It divides the target element by the given divisor and returns its result rounded based on the specified rounding mode

Parameters:
divisor - the divisor
roundingMode - the RoundingMode
Returns:
the result of target/divisor

divideBy

public static final Function<Integer,Integer> divideBy(int divisor,
                                                       RoundingMode roundingMode)

It divides the target element by the given divisor and returns its result rounded based on the specified rounding mode

Parameters:
divisor - the divisor
roundingMode - the RoundingMode
Returns:
the result of target/divisor

divideBy

public static final Function<Integer,Integer> divideBy(long divisor,
                                                       RoundingMode roundingMode)

It divides the target element by the given divisor and returns its result rounded based on the specified rounding mode

Parameters:
divisor - the divisor
roundingMode - the RoundingMode
Returns:
the result of target/divisor

divideBy

public static final Function<Integer,Integer> divideBy(float divisor,
                                                       RoundingMode roundingMode)

It divides the target element by the given divisor and returns its result rounded based on the specified rounding mode

Parameters:
divisor - the divisor
roundingMode - the RoundingMode
Returns:
the result of target/divisor

divideBy

public static final Function<Integer,Integer> divideBy(double divisor,
                                                       RoundingMode roundingMode)

It divides the target element by the given divisor and returns its result rounded based on the specified rounding mode

Parameters:
divisor - the divisor
roundingMode - the RoundingMode
Returns:
the result of target/divisor

module

public static final Function<Integer,Integer> module(byte module)

It performs a module operation and returns the value of (input mod module) which is always positive (whereas remainder is not)

Parameters:
module - the module
Returns:
the result of (input mod module)

module

public static final Function<Integer,Integer> module(short module)

It performs a module operation and returns the value of (input mod module) which is always positive (whereas remainder is not)

Parameters:
module - the module
Returns:
the result of (input mod module)

module

public static final Function<Integer,Integer> module(int module)

It performs a module operation and returns the value of (input mod module) which is always positive (whereas remainder is not)

Parameters:
module - the module
Returns:
the result of (input mod module)

module

public static final Function<Integer,Integer> module(long module)

It performs a module operation and returns the value of (input mod module) which is always positive (whereas remainder is not)

Parameters:
module - the module
Returns:
the result of (input mod module)

module

public static final Function<Integer,Integer> module(Byte module)

It performs a module operation and returns the value of (input mod module) which is always positive (whereas remainder is not)

Parameters:
module - the module
Returns:
the result of (input mod module)

module

public static final Function<Integer,Integer> module(Short module)

It performs a module operation and returns the value of (input mod module) which is always positive (whereas remainder is not)

Parameters:
module - the module
Returns:
the result of (input mod module)

module

public static final Function<Integer,Integer> module(Integer module)

It performs a module operation and returns the value of (input mod module) which is always positive (whereas remainder is not)

Parameters:
module - the module
Returns:
the result of (input mod module)

module

public static final Function<Integer,Integer> module(Long module)

It performs a module operation and returns the value of (input mod module) which is always positive (whereas remainder is not)

Parameters:
module - the module
Returns:
the result of (input mod module)

module

public static final Function<Integer,Integer> module(BigInteger module)

It performs a module operation and returns the value of (input mod module) which is always positive (whereas remainder is not)

Parameters:
module - the module
Returns:
the result of (input mod module)

remainder

public static final Function<Integer,Integer> remainder(Number divisor)

It divides the target element by the given divisor and returns the remainder (target % divisor)

Parameters:
divisor - the divisor
Returns:
the remainder of target/divisor

remainder

public static final Function<Integer,Integer> remainder(byte divisor)

It divides the target element by the given divisor and returns the remainder (target % divisor)

Parameters:
divisor - the divisor
Returns:
the remainder of target/divisor

remainder

public static final Function<Integer,Integer> remainder(short divisor)

It divides the target element by the given divisor and returns the remainder (target % divisor)

Parameters:
divisor - the divisor
Returns:
the remainder of target/divisor

remainder

public static final Function<Integer,Integer> remainder(int divisor)

It divides the target element by the given divisor and returns the remainder (target % divisor)

Parameters:
divisor - the divisor
Returns:
the remainder of target/divisor

remainder

public static final Function<Integer,Integer> remainder(long divisor)

It divides the target element by the given divisor and returns the remainder (target % divisor)

Parameters:
divisor - the divisor
Returns:
the remainder of target/divisor

remainder

public static final Function<Integer,Integer> remainder(float divisor)

It divides the target element by the given divisor and returns the remainder (target % divisor)

Parameters:
divisor - the divisor
Returns:
the remainder of target/divisor

remainder

public static final Function<Integer,Integer> remainder(double divisor)

It divides the target element by the given divisor and returns the remainder (target % divisor)

Parameters:
divisor - the divisor
Returns:
the remainder of target/divisor

multiplyBy

public static final Function<Integer,Integer> multiplyBy(Number multiplicand)

It multiplies target by multiplicand and returns its value

Parameters:
multiplicand - the multiplicand
Returns:
the result of target * multiplicand

multiplyBy

public static final Function<Integer,Integer> multiplyBy(byte multiplicand)

It multiplies target by multiplicand and returns its value

Parameters:
multiplicand - the multiplicand
Returns:
the result of target * multiplicand

multiplyBy

public static final Function<Integer,Integer> multiplyBy(short multiplicand)

It multiplies target by multiplicand and returns its value

Parameters:
multiplicand - the multiplicand
Returns:
the result of target * multiplicand

multiplyBy

public static final Function<Integer,Integer> multiplyBy(int multiplicand)

It multiplies target by multiplicand and returns its value

Parameters:
multiplicand - the multiplicand
Returns:
the result of target * multiplicand

multiplyBy

public static final Function<Integer,Integer> multiplyBy(long multiplicand)

It multiplies target by multiplicand and returns its value

Parameters:
multiplicand - the multiplicand
Returns:
the result of target * multiplicand

multiplyBy

public static final Function<Integer,Integer> multiplyBy(float multiplicand)

It multiplies target by multiplicand and returns its value

Parameters:
multiplicand - the multiplicand
Returns:
the result of target * multiplicand

multiplyBy

public static final Function<Integer,Integer> multiplyBy(double multiplicand)

It multiplies target by multiplicand and returns its value

Parameters:
multiplicand - the multiplicand
Returns:
the result of target * multiplicand

multiplyBy

public static final Function<Integer,Integer> multiplyBy(Number multiplicand,
                                                         MathContext mathContext)

It multiplies target by multiplicand and returns its value. The result precision and RoundingMode is specified by the given MathContext

Parameters:
multiplicand - the multiplicand
mathContext - the MathContext to define RoundingMode and precision
Returns:
the result of target * multiplicand

multiplyBy

public static final Function<Integer,Integer> multiplyBy(byte multiplicand,
                                                         MathContext mathContext)

It multiplies target by multiplicand and returns its value. The result precision and RoundingMode is specified by the given MathContext

Parameters:
multiplicand - the multiplicand
mathContext - the MathContext to define RoundingMode and precision
Returns:
the result of target * multiplicand

multiplyBy

public static final Function<Integer,Integer> multiplyBy(short multiplicand,
                                                         MathContext mathContext)

It multiplies target by multiplicand and returns its value. The result precision and RoundingMode is specified by the given MathContext

Parameters:
multiplicand - the multiplicand
mathContext - the MathContext to define RoundingMode and precision
Returns:
the result of target * multiplicand

multiplyBy

public static final Function<Integer,Integer> multiplyBy(int multiplicand,
                                                         MathContext mathContext)

It multiplies target by multiplicand and returns its value. The result precision and RoundingMode is specified by the given MathContext

Parameters:
multiplicand - the multiplicand
mathContext - the MathContext to define RoundingMode and precision
Returns:
the result of target * multiplicand

multiplyBy

public static final Function<Integer,Integer> multiplyBy(long multiplicand,
                                                         MathContext mathContext)

It multiplies target by multiplicand and returns its value. The result precision and RoundingMode is specified by the given MathContext

Parameters:
multiplicand - the multiplicand
mathContext - the MathContext to define RoundingMode and precision
Returns:
the result of target * multiplicand

multiplyBy

public static final Function<Integer,Integer> multiplyBy(float multiplicand,
                                                         MathContext mathContext)

It multiplies target by multiplicand and returns its value. The result precision and RoundingMode is specified by the given MathContext

Parameters:
multiplicand - the multiplicand
mathContext - the MathContext to define RoundingMode and precision
Returns:
the result of target * multiplicand

multiplyBy

public static final Function<Integer,Integer> multiplyBy(double multiplicand,
                                                         MathContext mathContext)

It multiplies target by multiplicand and returns its value. The result precision and RoundingMode is specified by the given MathContext

Parameters:
multiplicand - the multiplicand
mathContext - the MathContext to define RoundingMode and precision
Returns:
the result of target * multiplicand

multiplyBy

public static final Function<Integer,Integer> multiplyBy(Number multiplicand,
                                                         RoundingMode roundingMode)

It multiplies target by multiplicand and returns its value. The result is rounded based on the given RoundingMode

Parameters:
multiplicand - the multiplicand
roundingMode - the RoundingMode
Returns:
the result of target * multiplicand

multiplyBy

public static final Function<Integer,Integer> multiplyBy(byte multiplicand,
                                                         RoundingMode roundingMode)

It multiplies target by multiplicand and returns its value. The result is rounded based on the given RoundingMode

Parameters:
multiplicand - the multiplicand
roundingMode - the RoundingMode
Returns:
the result of target * multiplicand

multiplyBy

public static final Function<Integer,Integer> multiplyBy(short multiplicand,
                                                         RoundingMode roundingMode)

It multiplies target by multiplicand and returns its value. The result is rounded based on the given RoundingMode

Parameters:
multiplicand - the multiplicand
roundingMode - the RoundingMode
Returns:
the result of target * multiplicand

multiplyBy

public static final Function<Integer,Integer> multiplyBy(int multiplicand,
                                                         RoundingMode roundingMode)

It multiplies target by multiplicand and returns its value. The result is rounded based on the given RoundingMode

Parameters:
multiplicand - the multiplicand
roundingMode - the RoundingMode
Returns:
the result of target * multiplicand

multiplyBy

public static final Function<Integer,Integer> multiplyBy(long multiplicand,
                                                         RoundingMode roundingMode)

It multiplies target by multiplicand and returns its value. The result is rounded based on the given RoundingMode

Parameters:
multiplicand - the multiplicand
roundingMode - the RoundingMode
Returns:
the result of target * multiplicand

multiplyBy

public static final Function<Integer,Integer> multiplyBy(float multiplicand,
                                                         RoundingMode roundingMode)

It multiplies target by multiplicand and returns its value. The result is rounded based on the given RoundingMode

Parameters:
multiplicand - the multiplicand
roundingMode - the RoundingMode
Returns:
the result of target * multiplicand

multiplyBy

public static final Function<Integer,Integer> multiplyBy(double multiplicand,
                                                         RoundingMode roundingMode)

It multiplies target by multiplicand and returns its value. The result is rounded based on the given RoundingMode

Parameters:
multiplicand - the multiplicand
roundingMode - the RoundingMode
Returns:
the result of target * multiplicand

pow

public static final Function<Integer,Integer> pow(int power)

It performs the operation targetpower and returns its value

Parameters:
power - the power to raise the target to
Returns:
the result of targetpower

pow

public static final Function<Integer,Integer> pow(int power,
                                                  MathContext mathContext)

It performs the operation targetpower and returns its value. The result precision and rounding mode is specified by the given MathContext

Parameters:
power - the power to raise the target to
mathContext - the MathContext to specify precision and RoundingMode
Returns:
the result of targetpower

pow

public static final Function<Integer,Integer> pow(int power,
                                                  RoundingMode roundingMode)

It performs the operation targetpower and returns its value. The result rounding mode is specified by the given RoundingMode

Parameters:
power - the power to raise the target to
roundingMode - the RoundingMode
Returns:
the result of targetpower

between

public static final Function<Integer,Boolean> between(Number min,
                                                      Number max)

Determines whether the target object is between min and max in value, this is, whether target.compareTo(min) >= 0 && target.compareTo(max) <= 0. The target and the specified min and max have to implement Comparable.

Parameters:
min - the minimum value of the target
max - the maximum value of the target
Returns:
true if the target is between min and max (or it's equal to any of them)

between

public static final Function<Integer,Boolean> between(int min,
                                                      int max)

Determines whether the target object is between min and max in value, this is, whether target.compareTo(min) >= 0 && target.compareTo(max) <= 0. The target and the specified min and max have to implement Comparable.

Parameters:
min - the minimum value of the target
max - the maximum value of the target
Returns:
true if the target is between min and max (or it's equal to any of them)


Copyright © 2012 The OP4J team. All Rights Reserved.