## Functions: FnLong

### 1. Overview

FnLong is a function hub class containing a lot of static methods to work with Long objects. Those static methods return functions that take a Long object either as its input or output (depending on the function). It includes conversions to String, to an String representing a currency and logical operations between Long objects among others.

### 2. Functions

Function nameTypeParamsDescription
absFunction<Long, Long>

It returns the absolute value of the input

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

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

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

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

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

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

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

avgFunction<Iterable<Long>, Long>

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

avgFunction<Iterable<Long>, Long>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

avgFunction<Iterable<Long>, Long>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

avgArrayFunction<Long[], Long>

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

avgArrayFunction<Long[], Long>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

avgArrayFunction<Long[], Long>RoundingMode roundingMode

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

betweenFunction<Long,Boolean>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.

betweenFunction<Long,Boolean>long min
long 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.

divideByFunction<Long, Long>Number divisor

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

divideByFunction<Long, Long>byte divisor

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

divideByFunction<Long, Long>short divisor

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

divideByFunction<Long, Long>int divisor

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

divideByFunction<Long, Long>long divisor

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

divideByFunction<Long, Long>float divisor

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

divideByFunction<Long, Long>double divisor

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

divideByFunction<Long, Long>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

divideByFunction<Long, Long>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

divideByFunction<Long, Long>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

divideByFunction<Long, Long>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

divideByFunction<Long, Long>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

divideByFunction<Long, Long>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

divideByFunction<Long, Long>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

divideByFunction<Long, Long>Number divisor
RoundingMode roundingMode

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

divideByFunction<Long, Long>byte divisor
RoundingMode roundingMode

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

divideByFunction<Long, Long>short divisor
RoundingMode roundingMode

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

divideByFunction<Long, Long>int divisor
RoundingMode roundingMode

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

divideByFunction<Long, Long>long divisor
RoundingMode roundingMode

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

divideByFunction<Long, Long>float divisor
RoundingMode roundingMode

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

divideByFunction<Long, Long>double divisor
RoundingMode roundingMode

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

eqFunction<Long,Boolean>Long object

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

eqFunction<Long,Boolean>long object

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

eqByFunction<Long,Boolean>IFunction<Long,?> 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.

eqValueFunction<Long,Boolean>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.

eqValueFunction<Long,Boolean>long 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.

eqValueByFunction<Long,Boolean>IFunction<Long,?> 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.

greaterOrEqToFunction<Long,Boolean>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.

greaterOrEqToFunction<Long,Boolean>long 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.

greaterOrEqToByFunction<Long,Boolean>IFunction<Long,?> 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.

greaterThanFunction<Long,Boolean>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.

greaterThanFunction<Long,Boolean>long 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.

greaterThanByFunction<Long,Boolean>IFunction<Long,?> 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.

isNotNullFunction<Long,Boolean>

Determines whether the target object is null or not.

isNullFunction<Long,Boolean>

Determines whether the target object is null or not.

lessOrEqToFunction<Long,Boolean>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.

lessOrEqToFunction<Long,Boolean>long 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.

lessOrEqToByFunction<Long,Boolean>IFunction<Long,?> 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.

lessThanFunction<Long,Boolean>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.

lessThanFunction<Long,Boolean>long 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.

lessThanByFunction<Long,Boolean>IFunction<Long,?> 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.

maxFunction<Iterable<Long>, Long>

It returns the maximum number from an Iterable input object

maxArrayFunction<Long[], Long>

It returns the maximum number from the input array

minFunction<Iterable<Long>, Long>

It returns the minimum number from an Iterable input object

minArrayFunction<Long[], Long>

It returns the minimum number from the input array

moduleFunction<Long, Long>byte module

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

moduleFunction<Long, Long>short module

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

moduleFunction<Long, Long>int module

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

moduleFunction<Long, Long>long module

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

moduleFunction<Long, Long>Byte module

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

moduleFunction<Long, Long>Short module

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

moduleFunction<Long, Long>Integer module

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

moduleFunction<Long, Long>Long module

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

moduleFunction<Long, Long>BigInteger module

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

multiplyByFunction<Long, Long>Number multiplicand

It multiplies target by multiplicand and returns its value

multiplyByFunction<Long, Long>byte multiplicand

It multiplies target by multiplicand and returns its value

multiplyByFunction<Long, Long>short multiplicand

It multiplies target by multiplicand and returns its value

multiplyByFunction<Long, Long>int multiplicand

It multiplies target by multiplicand and returns its value

multiplyByFunction<Long, Long>long multiplicand

It multiplies target by multiplicand and returns its value

multiplyByFunction<Long, Long>float multiplicand

It multiplies target by multiplicand and returns its value

multiplyByFunction<Long, Long>double multiplicand

It multiplies target by multiplicand and returns its value

multiplyByFunction<Long, Long>Number multiplicand
MathContext mathContext

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

multiplyByFunction<Long, Long>byte multiplicand
MathContext mathContext

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

multiplyByFunction<Long, Long>short multiplicand
MathContext mathContext

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

multiplyByFunction<Long, Long>int multiplicand
MathContext mathContext

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

multiplyByFunction<Long, Long>long multiplicand
MathContext mathContext

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

multiplyByFunction<Long, Long>float multiplicand
MathContext mathContext

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

multiplyByFunction<Long, Long>double multiplicand
MathContext mathContext

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

multiplyByFunction<Long, Long>Number multiplicand
RoundingMode roundingMode

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

multiplyByFunction<Long, Long>byte multiplicand
RoundingMode roundingMode

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

multiplyByFunction<Long, Long>short multiplicand
RoundingMode roundingMode

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

multiplyByFunction<Long, Long>int multiplicand
RoundingMode roundingMode

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

multiplyByFunction<Long, Long>long multiplicand
RoundingMode roundingMode

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

multiplyByFunction<Long, Long>float multiplicand
RoundingMode roundingMode

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

multiplyByFunction<Long, Long>double multiplicand
RoundingMode roundingMode

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

notEqFunction<Long,Boolean>Long object

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

notEqFunction<Long,Boolean>long object

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

notEqByFunction<Long,Boolean>IFunction<Long,?> 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.

notEqValueFunction<Long,Boolean>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.

notEqValueFunction<Long,Boolean>long 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.

notEqValueByFunction<Long,Boolean>IFunction<Long,?> 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.

powFunction<Long, Long>int power

It performs the operation targetpower and returns its value

powFunction<Long, Long>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

powFunction<Long, Long>int power
RoundingMode roundingMode

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

remainderFunction<Long, Long>Number divisor

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

remainderFunction<Long, Long>byte divisor

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

remainderFunction<Long, Long>short divisor

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

remainderFunction<Long, Long>int divisor

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

remainderFunction<Long, Long>long divisor

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

remainderFunction<Long, Long>float divisor

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

remainderFunction<Long, Long>double divisor

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

subtractFunction<Long, Long>Number subtract

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

subtractFunction<Long, Long>byte subtract

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

subtractFunction<Long, Long>short subtract

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

subtractFunction<Long, Long>int subtract

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

subtractFunction<Long, Long>long subtract

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

subtractFunction<Long, Long>float subtract

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

subtractFunction<Long, Long>double subtract

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

sumFunction<Iterable<Long>, Long>

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

sumArrayFunction<Long[], Long>

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

toCurrencyStrFunction<Long,String>

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

toCurrencyStrFunction<Long,String>boolean groupingUsed

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

toCurrencyStrFunction<Long,String>Locale locale

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

toCurrencyStrFunction<Long,String>String locale

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

toCurrencyStrFunction<Long,String>Locale locale
boolean groupingUsed

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

toCurrencyStrFunction<Long,String>String locale
boolean groupingUsed

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

toPercentStrFunction<Long,String>

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

toPercentStrFunction<Long,String>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
toPercentStrFunction<Long,String>Locale locale

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

toPercentStrFunction<Long,String>String locale

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

toPercentStrFunction<Long,String>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.

toPercentStrFunction<Long,String>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.

toStrFunction<Long,String>

It returns the String representation of the input number

toStrFunction<Long,String>boolean groupingUsed

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

toStrFunction<Long,String>Locale locale

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

toStrFunction<Long,String>String locale

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

toStrFunction<Long,String>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

toStrFunction<Long,String>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