|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object org.op4j.functions.FnDouble
public final class FnDouble
Method Summary | |
---|---|
static Function<Double,Double> |
abs()
It returns the absolute value of the input |
static Function<Double,Double> |
add(byte add)
It adds the given number to the target and returns the result |
static Function<Double,Double> |
add(double add)
It adds the given number to the target and returns the result |
static Function<Double,Double> |
add(float add)
It adds the given number to the target and returns the result |
static Function<Double,Double> |
add(int add)
It adds the given number to the target and returns the result |
static Function<Double,Double> |
add(long add)
It adds the given number to the target and returns the result |
static Function<Double,Double> |
add(Number add)
It adds the given number to the target and returns the result |
static Function<Double,Double> |
add(short add)
It adds the given number to the target and returns the result |
static Function<Iterable<Double>,Double> |
avg()
It returns the average of all the numbers in the Iterable input object
|
static Function<Iterable<Double>,Double> |
avg(MathContext mathContext)
It returns the average of all the numbers in the Iterable input object. |
static Function<Iterable<Double>,Double> |
avg(RoundingMode roundingMode)
It returns the average of all the numbers in the Iterable input object. |
static Function<Double[],Double> |
avgArray()
It returns the average of all the numbers in the input array |
static Function<Double[],Double> |
avgArray(MathContext mathContext)
It returns the average of all the numbers in the input array. |
static Function<Double[],Double> |
avgArray(RoundingMode roundingMode)
It returns the average of all the numbers in the input array. |
static Function<Double,Boolean> |
between(double min,
double 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<Double,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<Double,Double> |
divideBy(byte divisor)
It divides the target element by the given divisor and returns its result |
static Function<Double,Double> |
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<Double,Double> |
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<Double,Double> |
divideBy(double divisor)
It divides the target element by the given divisor and returns its result |
static Function<Double,Double> |
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<Double,Double> |
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<Double,Double> |
divideBy(float divisor)
It divides the target element by the given divisor and returns its result |
static Function<Double,Double> |
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<Double,Double> |
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<Double,Double> |
divideBy(int divisor)
It divides the target element by the given divisor and returns its result |
static Function<Double,Double> |
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<Double,Double> |
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<Double,Double> |
divideBy(long divisor)
It divides the target element by the given divisor and returns its result |
static Function<Double,Double> |
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<Double,Double> |
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<Double,Double> |
divideBy(Number divisor)
It divides the target element by the given divisor and returns its result |
static Function<Double,Double> |
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<Double,Double> |
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<Double,Double> |
divideBy(short divisor)
It divides the target element by the given divisor and returns its result |
static Function<Double,Double> |
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<Double,Double> |
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<Double,Boolean> |
eq(double object)
Determines whether the target object and the specified object are equal by calling the equals method on the target object. |
static Function<Double,Boolean> |
eq(Double object)
Determines whether the target object and the specified object are equal by calling the equals method on the target object. |
static Function<Double,Boolean> |
eqBy(IFunction<Double,?> 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<Double,Boolean> |
eqValue(double object)
Determines whether the target object and the specified object are equal in value, this is, whether target.compareTo(object) == 0. |
static Function<Double,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<Double,Boolean> |
eqValueBy(IFunction<Double,?> 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<Double,Boolean> |
greaterOrEqTo(double 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<Double,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<Double,Boolean> |
greaterOrEqToBy(IFunction<Double,?> 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<Double,Boolean> |
greaterThan(double object)
Determines whether the target object is greater than the specified object in value, this is, whether target.compareTo(object) > 0. |
static Function<Double,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<Double,Boolean> |
greaterThanBy(IFunction<Double,?> 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<Double,Boolean> |
isNotNull()
Determines whether the target object is null or not. |
static Function<Double,Boolean> |
isNull()
Determines whether the target object is null or not. |
static Function<Double,Boolean> |
lessOrEqTo(double 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<Double,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<Double,Boolean> |
lessOrEqToBy(IFunction<Double,?> 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<Double,Boolean> |
lessThan(double object)
Determines whether the target object is less than the specified object in value, this is, whether target.compareTo(object) < 0. |
static Function<Double,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<Double,Boolean> |
lessThanBy(IFunction<Double,?> 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<Double>,Double> |
max()
It returns the maximum number from an Iterable input object
|
static Function<Double[],Double> |
maxArray()
It returns the maximum number from the input array |
static Function<Iterable<Double>,Double> |
min()
It returns the minimum number from an Iterable input object
|
static Function<Double[],Double> |
minArray()
It returns the minimum number from the input array |
static Function<Double,Double> |
multiplyBy(byte multiplicand)
It multiplies target by multiplicand and returns its value |
static Function<Double,Double> |
multiplyBy(byte multiplicand,
MathContext mathContext)
It multiplies target by multiplicand and returns its value. |
static Function<Double,Double> |
multiplyBy(byte multiplicand,
RoundingMode roundingMode)
It multiplies target by multiplicand and returns its value. |
static Function<Double,Double> |
multiplyBy(double multiplicand)
It multiplies target by multiplicand and returns its value |
static Function<Double,Double> |
multiplyBy(double multiplicand,
MathContext mathContext)
It multiplies target by multiplicand and returns its value. |
static Function<Double,Double> |
multiplyBy(double multiplicand,
RoundingMode roundingMode)
It multiplies target by multiplicand and returns its value. |
static Function<Double,Double> |
multiplyBy(float multiplicand)
It multiplies target by multiplicand and returns its value |
static Function<Double,Double> |
multiplyBy(float multiplicand,
MathContext mathContext)
It multiplies target by multiplicand and returns its value. |
static Function<Double,Double> |
multiplyBy(float multiplicand,
RoundingMode roundingMode)
It multiplies target by multiplicand and returns its value. |
static Function<Double,Double> |
multiplyBy(int multiplicand)
It multiplies target by multiplicand and returns its value |
static Function<Double,Double> |
multiplyBy(int multiplicand,
MathContext mathContext)
It multiplies target by multiplicand and returns its value. |
static Function<Double,Double> |
multiplyBy(int multiplicand,
RoundingMode roundingMode)
It multiplies target by multiplicand and returns its value. |
static Function<Double,Double> |
multiplyBy(long multiplicand)
It multiplies target by multiplicand and returns its value |
static Function<Double,Double> |
multiplyBy(long multiplicand,
MathContext mathContext)
It multiplies target by multiplicand and returns its value. |
static Function<Double,Double> |
multiplyBy(long multiplicand,
RoundingMode roundingMode)
It multiplies target by multiplicand and returns its value. |
static Function<Double,Double> |
multiplyBy(Number multiplicand)
It multiplies target by multiplicand and returns its value |
static Function<Double,Double> |
multiplyBy(Number multiplicand,
MathContext mathContext)
It multiplies target by multiplicand and returns its value. |
static Function<Double,Double> |
multiplyBy(Number multiplicand,
RoundingMode roundingMode)
It multiplies target by multiplicand and returns its value. |
static Function<Double,Double> |
multiplyBy(short multiplicand)
It multiplies target by multiplicand and returns its value |
static Function<Double,Double> |
multiplyBy(short multiplicand,
MathContext mathContext)
It multiplies target by multiplicand and returns its value. |
static Function<Double,Double> |
multiplyBy(short multiplicand,
RoundingMode roundingMode)
It multiplies target by multiplicand and returns its value. |
static Function<Double,Boolean> |
notEq(double object)
Determines whether the target object and the specified object are NOT equal by calling the equals method on the target object. |
static Function<Double,Boolean> |
notEq(Double object)
Determines whether the target object and the specified object are NOT equal by calling the equals method on the target object. |
static Function<Double,Boolean> |
notEqBy(IFunction<Double,?> 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<Double,Boolean> |
notEqValue(double object)
Determines whether the target object and the specified object are NOT equal in value, this is, whether target.compareTo(object) ! |
static Function<Double,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<Double,Boolean> |
notEqValueBy(IFunction<Double,?> 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<Double,Double> |
pow(int power)
It performs the operation targetpower and returns its value |
static Function<Double,Double> |
pow(int power,
MathContext mathContext)
It performs the operation targetpower and returns its value. |
static Function<Double,Double> |
pow(int power,
RoundingMode roundingMode)
It performs the operation targetpower and returns its value. |
static Function<Double,Double> |
remainder(byte divisor)
It divides the target element by the given divisor and returns the remainder (target % divisor) |
static Function<Double,Double> |
remainder(byte divisor,
MathContext mathContext)
It divides the target element by the given divisor and returns the remainder (target % divisor). |
static Function<Double,Double> |
remainder(double divisor)
It divides the target element by the given divisor and returns the remainder (target % divisor) |
static Function<Double,Double> |
remainder(double divisor,
MathContext mathContext)
It divides the target element by the given divisor and returns the remainder (target % divisor). |
static Function<Double,Double> |
remainder(float divisor)
It divides the target element by the given divisor and returns the remainder (target % divisor) |
static Function<Double,Double> |
remainder(float divisor,
MathContext mathContext)
It divides the target element by the given divisor and returns the remainder (target % divisor). |
static Function<Double,Double> |
remainder(int divisor)
It divides the target element by the given divisor and returns the remainder (target % divisor) |
static Function<Double,Double> |
remainder(int divisor,
MathContext mathContext)
It divides the target element by the given divisor and returns the remainder (target % divisor). |
static Function<Double,Double> |
remainder(long divisor)
It divides the target element by the given divisor and returns the remainder (target % divisor) |
static Function<Double,Double> |
remainder(long divisor,
MathContext mathContext)
It divides the target element by the given divisor and returns the remainder (target % divisor). |
static Function<Double,Double> |
remainder(Number divisor)
It divides the target element by the given divisor and returns the remainder (target % divisor) |
static Function<Double,Double> |
remainder(Number divisor,
MathContext mathContext)
It divides the target element by the given divisor and returns the remainder (target % divisor). |
static Function<Double,Double> |
remainder(short divisor)
It divides the target element by the given divisor and returns the remainder (target % divisor) |
static Function<Double,Double> |
remainder(short divisor,
MathContext mathContext)
It divides the target element by the given divisor and returns the remainder (target % divisor). |
static Function<Double,Double> |
round(MathContext mathContext)
It rounds the input number with the given MathContext
|
static Function<Double,Double> |
round(RoundingMode roundingMode)
It rounds the input number with the given RoundingMode
|
static Function<Double,Double> |
roundDouble(int scale,
RoundingMode roundingMode)
|
static Function<Double,Double> |
subtract(byte subtract)
It subtracts the given number from the target and returns the result |
static Function<Double,Double> |
subtract(double subtract)
It subtracts the given number from the target and returns the result |
static Function<Double,Double> |
subtract(float subtract)
It subtracts the given number from the target and returns the result |
static Function<Double,Double> |
subtract(int subtract)
It subtracts the given number from the target and returns the result |
static Function<Double,Double> |
subtract(long subtract)
It subtracts the given number from the target and returns the result |
static Function<Double,Double> |
subtract(Number subtract)
It subtracts the given number from the target and returns the result |
static Function<Double,Double> |
subtract(short subtract)
It subtracts the given number from the target and returns the result |
static Function<Iterable<Double>,Double> |
sum()
It returns the sum of all the numbers in the Iterable input object
|
static Function<Double[],Double> |
sumArray()
It returns the sum of all the numbers in the input array |
static Function<Double,String> |
toCurrencyStr()
It returns the String representation of the target as a currency in the
default Locale
|
static Function<Double,String> |
toCurrencyStr(boolean groupingUsed)
It returns the String representation of the target as a currency in the
default Locale
|
static Function<Double,String> |
toCurrencyStr(Locale locale)
It returns the String representation of the target as a currency in the
given Locale
|
static Function<Double,String> |
toCurrencyStr(Locale locale,
boolean groupingUsed)
It returns the String representation of the target as a currency in the
given Locale
|
static Function<Double,String> |
toCurrencyStr(Locale locale,
int minIntegerDigits,
int minFractionDigits,
int maxFractionDigits,
boolean groupingUsed)
It returns the String representation of the target as a currency in the
given Locale . |
static Function<Double,String> |
toCurrencyStr(Locale locale,
int minIntegerDigits,
int minFractionDigits,
int maxFractionDigits,
boolean groupingUsed,
char decimalSeparator,
boolean decimalSeparatorAlwaysShown)
It returns the String representation of the target as a currency in the
given Locale taking into account the given parameters. |
static Function<Double,String> |
toCurrencyStr(Locale locale,
int minIntegerDigits,
int minFractionDigits,
int maxFractionDigits,
char groupingSeparator,
char decimalSeparator,
boolean decimalSeparatorAlwaysShown)
It returns the String representation of the target as a currency in the
given Locale taking into account the given parameters. |
static Function<Double,String> |
toCurrencyStr(String locale)
It returns the String representation of the target as a currency in the
given locale
|
static Function<Double,String> |
toCurrencyStr(String locale,
boolean groupingUsed)
It returns the String representation of the target as a currency in the
given locale
|
static Function<Double,String> |
toCurrencyStr(String locale,
int minIntegerDigits,
int minFractionDigits,
int maxFractionDigits,
boolean groupingUsed)
It returns the String representation of the target as a currency in the
given locale taking into account the given parameters. |
static Function<Double,String> |
toCurrencyStr(String locale,
int minIntegerDigits,
int minFractionDigits,
int maxFractionDigits,
boolean groupingUsed,
char decimalSeparator,
boolean decimalSeparatorAlwaysShown)
It returns the String representation of the target as a currency in the
given locale taking into account the given parameters. |
static Function<Double,String> |
toCurrencyStr(String locale,
int minIntegerDigits,
int minFractionDigits,
int maxFractionDigits,
char groupingSeparator,
char decimalSeparator,
boolean decimalSeparatorAlwaysShown)
It returns the String representation of the target as a currency in the
given locale taking into account the given parameters. |
static Function<Double,String> |
toPercentStr()
A String representing a percentage is created from the target number. |
static Function<Double,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<Double,String> |
toPercentStr(Locale locale)
A String representing a percentage is created from the target number
in the given Locale
|
static Function<Double,String> |
toPercentStr(Locale locale,
boolean groupingUsed)
A String representing a percentage is created from the target number
in the given Locale . |
static Function<Double,String> |
toPercentStr(Locale locale,
int minIntegerDigits,
int minFractionDigits,
int maxFractionDigits,
boolean groupingUsed)
A String representing a percentage is created from the target number
in the given Locale . |
static Function<Double,String> |
toPercentStr(Locale locale,
int minIntegerDigits,
int minFractionDigits,
int maxFractionDigits,
boolean groupingUsed,
char decimalSeparator,
boolean decimalSeparatorAlwaysShown)
A String representing a percentage is created from the target number
in the given locale and using the other given parameters as well. |
static Function<Double,String> |
toPercentStr(Locale locale,
int minIntegerDigits,
int minFractionDigits,
int maxFractionDigits,
char groupingSeparator,
char decimalSeparator,
boolean decimalSeparatorAlwaysShown)
A String representing a percentage is created from the target number
in the given Locale and using the other given parameters as well. |
static Function<Double,String> |
toPercentStr(String locale)
A String representing a percentage is created from the target number
in the given locale
|
static Function<Double,String> |
toPercentStr(String locale,
boolean groupingUsed)
A String representing a percentage is created from the target number
in the given locale. |
static Function<Double,String> |
toPercentStr(String locale,
int minIntegerDigits,
int minFractionDigits,
int maxFractionDigits,
boolean groupingUsed)
A String representing a percentage is created from the target number
in the given locale. |
static Function<Double,String> |
toPercentStr(String locale,
int minIntegerDigits,
int minFractionDigits,
int maxFractionDigits,
boolean groupingUsed,
char decimalSeparator,
boolean decimalSeparatorAlwaysShown)
A String representing a percentage is created from the target number
in the given locale and using the other given parameters as well. |
static Function<Double,String> |
toPercentStr(String locale,
int minIntegerDigits,
int minFractionDigits,
int maxFractionDigits,
char groupingSeparator,
char decimalSeparator,
boolean decimalSeparatorAlwaysShown)
A String representing a percentage is created from the target number
in the given locale and using the other given parameters as well. |
static Function<Double,String> |
toStr()
It returns the String representation of the input number
|
static Function<Double,String> |
toStr(boolean groupingUsed)
It returns the String representation of the input number either
using or not using grouping
|
static Function<Double,String> |
toStr(Locale locale)
It returns the String representation of the target number in the given Locale
|
static Function<Double,String> |
toStr(Locale locale,
boolean groupingUsed)
It returns the String representation of the target number in the given Locale . |
static Function<Double,String> |
toStr(Locale locale,
int minIntegerDigits,
int minFractionDigits,
int maxFractionDigits,
boolean groupingUsed)
It returns the String representation of the target number in the given Locale . |
static Function<Double,String> |
toStr(Locale locale,
int minIntegerDigits,
int minFractionDigits,
int maxFractionDigits,
boolean groupingUsed,
char decimalSeparator,
boolean decimalSeparatorAlwaysShown)
It returns the String representation of the target number in the given Locale . |
static Function<Double,String> |
toStr(Locale locale,
int minIntegerDigits,
int minFractionDigits,
int maxFractionDigits,
char groupingSeparator,
char decimalSeparator,
boolean decimalSeparatorAlwaysShown)
It returns the String representation of the target number in the given Locale . |
static Function<Double,String> |
toStr(String locale)
It returns the String representation of the target number in the given locale
|
static Function<Double,String> |
toStr(String locale,
boolean groupingUsed)
It returns the String representation of the target number in the given locale. |
static Function<Double,String> |
toStr(String locale,
int minIntegerDigits,
int minFractionDigits,
int maxFractionDigits,
boolean groupingUsed)
It returns the String representation of the target number in the given locale. |
static Function<Double,String> |
toStr(String locale,
int minIntegerDigits,
int minFractionDigits,
int maxFractionDigits,
boolean groupingUsed,
char decimalSeparator,
boolean decimalSeparatorAlwaysShown)
It returns the String representation of the target number in the given locale. |
static Function<Double,String> |
toStr(String locale,
int minIntegerDigits,
int minFractionDigits,
int maxFractionDigits,
char groupingSeparator,
char decimalSeparator,
boolean decimalSeparatorAlwaysShown)
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 |
---|
public static final Function<Double,Double> roundDouble(int scale, RoundingMode roundingMode)
public static final Function<Double,String> toStr()
It returns the String
representation of the input number
String
representation of the inputpublic static final Function<Double,String> toStr(boolean groupingUsed)
It returns the String
representation of the input number either
using or not using grouping
groupingUsed
- whether or not grouping will be used
String
representation of the inputpublic static final Function<Double,String> toStr(Locale locale)
It returns the String
representation of the target number in the given Locale
locale
- the Locale
to be used
String
representation of the inputpublic static final Function<Double,String> toStr(String locale)
It returns the String
representation of the target number in the given locale
locale
- the locale to be used
String
representation of the inputpublic static final Function<Double,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
locale
- the Locale
to be usedgroupingUsed
- whether or not grouping will be used
String
representation of the inputpublic static final Function<Double,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
locale
- the locale to be usedgroupingUsed
- whether or not grouping will be used
String
representation of the inputpublic static final Function<Double,String> toStr(Locale locale, int minIntegerDigits, int minFractionDigits, int maxFractionDigits, boolean groupingUsed)
It returns the String
representation of the target number in the given Locale
.
If necessary, it will add leading or trailing zeros to the string based on the given parameters. So,
toStr(Locale.ENGLISH, 3, 2, 2, true) would return 010.00 if target number is 10
toStr(Locale.ENGLISH, 2, 2, 4, true) would return 00.00 if target number is 0
locale
- the Locale
to be usedminIntegerDigits
- minimum number of integer digits so, if not enough in the
target number, 0's will be added to the left of the integer partminFractionDigits
- minimum number of fraction digits so, if not enough in the
target number, 0's will be added to the right of the decimal partmaxFractionDigits
- maximum number of fraction digitsgroupingUsed
- whether or not grouping will be used
String
representation of the inputpublic static final Function<Double,String> toStr(String locale, int minIntegerDigits, int minFractionDigits, int maxFractionDigits, boolean groupingUsed)
It returns the String
representation of the target number in the given locale.
If necessary, it will add leading or trailing zeros to the string based on the given parameters. So,
toStr(Locale.ENGLISH.toString(), 3, 2, 2, true) would return 010.00 if target number is 10
toStr(Locale.ENGLISH.toString(), 2, 2, 4, true) would return 00.00 if target number is 0
locale
- the locale to be usedminIntegerDigits
- minimum number of integer digits so, if not enough in the
target number, 0's will be added to the left of the integer partminFractionDigits
- minimum number of fraction digits so, if not enough in the
target number, 0's will be added to the right of the decimal partmaxFractionDigits
- maximum number of fraction digitsgroupingUsed
- whether or not grouping will be used
String
representation of the inputpublic static final Function<Double,String> toStr(Locale locale, int minIntegerDigits, int minFractionDigits, int maxFractionDigits, char groupingSeparator, char decimalSeparator, boolean decimalSeparatorAlwaysShown)
It returns the String
representation of the target number in the given Locale
.
If necessary, it will add leading or trailing zeros to the string based on the given parameters. So,
toStr(Locale.ENGLISH, 3, 2, 2, ',', '.', true) would return 1,000.00 if target number is 1000
toStr(Locale.ENGLISH, 2, 2, 4, ',', '.', true) would return 00.00 if target number is 0
locale
- the Locale
to be usedminIntegerDigits
- minimum number of integer digits so, if not enough in the
target number, 0's will be added to the left of the integer partminFractionDigits
- minimum number of fraction digits so, if not enough in the
target number, 0's will be added to the right of the decimal partmaxFractionDigits
- maximum number of fraction digitsgroupingSeparator
- grouping separator to be useddecimalSeparator
- decimal separator to be useddecimalSeparatorAlwaysShown
- whether decimal separator should be shown
even if the decimal part is zero or not
String
representation of the inputpublic static final Function<Double,String> toStr(Locale locale, int minIntegerDigits, int minFractionDigits, int maxFractionDigits, boolean groupingUsed, char decimalSeparator, boolean decimalSeparatorAlwaysShown)
It returns the String
representation of the target number in the given Locale
.
If necessary, it will add leading or trailing zeros to the string based on the given parameters. So,
toStr(Locale.ENGLISH, 3, 2, 2, true, ',', true) would return 1,000,00 if target number is 1000
toStr(Locale.ENGLISH, 2, 2, 4, true, ',', true) would return 00,00 if target number is 0
locale
- the Locale
to be usedminIntegerDigits
- minimum number of integer digits so, if not enough in the
target number, 0's will be added to the left of the integer partminFractionDigits
- minimum number of fraction digits so, if not enough in the
target number, 0's will be added to the right of the decimal partmaxFractionDigits
- maximum number of fraction digitsgroupingUsed
- whether or not grouping will be useddecimalSeparator
- decimal separator to be useddecimalSeparatorAlwaysShown
- whether decimal separator should be shown
even if the decimal part is zero or not
String
representation of the inputpublic static final Function<Double,String> toStr(String locale, int minIntegerDigits, int minFractionDigits, int maxFractionDigits, char groupingSeparator, char decimalSeparator, boolean decimalSeparatorAlwaysShown)
It returns the String
representation of the target number in the given locale.
If necessary, it will add leading or trailing zeros to the string based on the given parameters. So,
toStr(Locale.ENGLISH.toString(), 3, 2, 2, ',', '.', true) would return 1,000.00 if target number is 1000
toStr(Locale.ENGLISH.toString(), 2, 2, 4, ',', '.', true) would return 00.00 if target number is 0
locale
- the locale to be usedminIntegerDigits
- minimum number of integer digits so, if not enough in the
target number, 0's will be added to the left of the integer partminFractionDigits
- minimum number of fraction digits so, if not enough in the
target number, 0's will be added to the right of the decimal partmaxFractionDigits
- maximum number of fraction digitsgroupingSeparator
- grouping separator to be useddecimalSeparator
- decimal separator to be useddecimalSeparatorAlwaysShown
- whether decimal separator should be shown
even if the decimal part is zero or not
String
representation of the inputpublic static final Function<Double,String> toStr(String locale, int minIntegerDigits, int minFractionDigits, int maxFractionDigits, boolean groupingUsed, char decimalSeparator, boolean decimalSeparatorAlwaysShown)
It returns the String
representation of the target number in the given locale.
If necessary, it will add leading or trailing zeros to the string based on the given parameters. So,
toStr(Locale.ENGLISH.toString(), 3, 2, 2, true, ',', true) would return 1,000,00 if target number is 1000
toStr(Locale.ENGLISH.toString(), 2, 2, 4, true, ',', true) would return 00,00 if target number is 0
locale
- the locale to be usedminIntegerDigits
- minimum number of integer digits so, if not enough in the
target number, 0's will be added to the left of the integer partminFractionDigits
- minimum number of fraction digits so, if not enough in the
target number, 0's will be added to the right of the decimal partmaxFractionDigits
- maximum number of fraction digitsgroupingUsed
- whether or not grouping will be useddecimalSeparator
- decimal separator to be useddecimalSeparatorAlwaysShown
- whether decimal separator should be shown
even if the decimal part is zero or not
String
representation of the inputpublic static final Function<Double,String> toCurrencyStr()
It returns the String
representation of the target as a currency in the
default Locale
String
representation of the input as a currencypublic static final Function<Double,String> toCurrencyStr(boolean groupingUsed)
It returns the String
representation of the target as a currency in the
default Locale
groupingUsed
- whether or not grouping will be used
String
representation of the input as a currencypublic static final Function<Double,String> toCurrencyStr(Locale locale)
It returns the String
representation of the target as a currency in the
given Locale
locale
- the Locale
to be used
String
representation of the input as a currencypublic static final Function<Double,String> toCurrencyStr(String locale)
It returns the String
representation of the target as a currency in the
given locale
locale
- the locale to be used
String
representation of the input as a currencypublic static final Function<Double,String> toCurrencyStr(Locale locale, boolean groupingUsed)
It returns the String
representation of the target as a currency in the
given Locale
locale
- the Locale
to be usedgroupingUsed
- whether or not grouping will be used
String
representation of the input as a currencypublic static final Function<Double,String> toCurrencyStr(String locale, boolean groupingUsed)
It returns the String
representation of the target as a currency in the
given locale
locale
- the locale to be usedgroupingUsed
- whether or not grouping will be used
String
representation of the input as a currencypublic static final Function<Double,String> toCurrencyStr(Locale locale, int minIntegerDigits, int minFractionDigits, int maxFractionDigits, boolean groupingUsed)
It returns the String
representation of the target as a currency in the
given Locale
.
If necessary, it will add leading or trailing zeros to the string based on the given parameters. So,
toCurrencyStr(Locale.UK, 3, 2, 2, true) would return £1,000.00 if target number is 1000
toCurrencyStr(Locale.UK, 2, 2, 4, true) would return £00.00 if target number is 0
locale
- the Locale
to be usedminIntegerDigits
- minimum number of integer digits so, if not enough in the
target number, 0's will be added to the left of the integer partminFractionDigits
- minimum number of fraction digits so, if not enough in the
target number, 0's will be added to the right of the decimal partmaxFractionDigits
- maximum number of fraction digitsgroupingUsed
- whether or not grouping will be used
String
representation of the input as a currencypublic static final Function<Double,String> toCurrencyStr(String locale, int minIntegerDigits, int minFractionDigits, int maxFractionDigits, boolean groupingUsed)
It returns the String
representation of the target as a currency in the
given locale taking into account the given parameters.
If necessary, it will add leading or trailing zeros to the string based on the given parameters. So,
toCurrencyStr(Locale.UK.toString(), 3, 2, 2, true) would return £1,000.00 if target number is 1000
toCurrencyStr(Locale.UK.toString(), 2, 2, 4, true) would return £00.00 if target number is 0
locale
- the locale to be usedminIntegerDigits
- minimum number of integer digits so, if not enough in the
target number, 0's will be added to the left of the integer partminFractionDigits
- minimum number of fraction digits so, if not enough in the
target number, 0's will be added to the right of the decimal partmaxFractionDigits
- maximum number of fraction digitsgroupingUsed
- whether or not grouping will be used
String
representation of the input as a currencypublic static final Function<Double,String> toCurrencyStr(Locale locale, int minIntegerDigits, int minFractionDigits, int maxFractionDigits, char groupingSeparator, char decimalSeparator, boolean decimalSeparatorAlwaysShown)
It returns the String
representation of the target as a currency in the
given Locale
taking into account the given parameters.
If necessary, it will add leading or trailing zeros to the string based on the given parameters. So,
toCurrencyStr(Locale.UK, 3, 2, 2, ',', ',', true) would return £1,000,00 if target number is 1000
toCurrencyStr(Locale.UK, 2, 2, 4, ',', ',', true) would return £00,00 if target number is 0
locale
- the Locale
to be usedminIntegerDigits
- minimum number of integer digits so, if not enough in the
target number, 0's will be added to the left of the integer partminFractionDigits
- minimum number of fraction digits so, if not enough in the
target number, 0's will be added to the right of the decimal partmaxFractionDigits
- maximum number of fraction digitsgroupingSeparator
- grouping separator to be useddecimalSeparator
- decimal separator to be useddecimalSeparatorAlwaysShown
- whether decimal separator should be shown
even if the decimal part is zero or not
String
representation of the input as a currencypublic static final Function<Double,String> toCurrencyStr(Locale locale, int minIntegerDigits, int minFractionDigits, int maxFractionDigits, boolean groupingUsed, char decimalSeparator, boolean decimalSeparatorAlwaysShown)
It returns the String
representation of the target as a currency in the
given Locale
taking into account the given parameters.
If necessary, it will add leading or trailing zeros to the string based on the given parameters. So,
toCurrencyStr(Locale.UK.toString(), 3, 2, 2, ',', ',', true) would return £1,000,00 if target number is 1000
toCurrencyStr(Locale.UK.toString(), 2, 2, 4, ',', ',', true) would return £00,00 if target number is 0
locale
- the Locale
to be usedminIntegerDigits
- minimum number of integer digits so, if not enough in the
target number, 0's will be added to the left of the integer partminFractionDigits
- minimum number of fraction digits so, if not enough in the
target number, 0's will be added to the right of the decimal partmaxFractionDigits
- maximum number of fraction digitsgroupingUsed
- whether or not grouping will be useddecimalSeparator
- decimal separator to be useddecimalSeparatorAlwaysShown
- whether decimal separator should be shown
even if the decimal part is zero or not
String
representation of the input as a currencypublic static final Function<Double,String> toCurrencyStr(String locale, int minIntegerDigits, int minFractionDigits, int maxFractionDigits, char groupingSeparator, char decimalSeparator, boolean decimalSeparatorAlwaysShown)
It returns the String
representation of the target as a currency in the
given locale taking into account the given parameters.
If necessary, it will add leading or trailing zeros to the string based on the given parameters. So,
toCurrencyStr(Locale.UK, 3, 2, 2, ',', ',', true) would return £1,000,00 if target number is 1000
toCurrencyStr(Locale.UK, 2, 2, 4, ',', ',', true) would return £00,00 if target number is 0
locale
- the locale to be usedminIntegerDigits
- minimum number of integer digits so, if not enough in the
target number, 0's will be added to the left of the integer partminFractionDigits
- minimum number of fraction digits so, if not enough in the
target number, 0's will be added to the right of the decimal partmaxFractionDigits
- maximum number of fraction digitsgroupingSeparator
- grouping separator to be useddecimalSeparator
- decimal separator to be useddecimalSeparatorAlwaysShown
- whether decimal separator should be shown
even if the decimal part is zero or not
String
representation of the input as a currencypublic static final Function<Double,String> toCurrencyStr(String locale, int minIntegerDigits, int minFractionDigits, int maxFractionDigits, boolean groupingUsed, char decimalSeparator, boolean decimalSeparatorAlwaysShown)
It returns the String
representation of the target as a currency in the
given locale taking into account the given parameters.
If necessary, it will add leading or trailing zeros to the string based on the given parameters. So,
toCurrencyStr(Locale.UK.toString(), 3, 2, 2, ',', ',', true) would return £1,000,00 if target number is 1000
toCurrencyStr(Locale.UK.toString(), 2, 2, 4, ',', ',', true) would return £00,00 if target number is 0
locale
- the locale to be usedminIntegerDigits
- minimum number of integer digits so, if not enough in the
target number, 0's will be added to the left of the integer partminFractionDigits
- minimum number of fraction digits so, if not enough in the
target number, 0's will be added to the right of the decimal partmaxFractionDigits
- maximum number of fraction digitsgroupingUsed
- whether or not grouping will be useddecimalSeparator
- decimal separator to be useddecimalSeparatorAlwaysShown
- whether decimal separator should be shown
even if the decimal part is zero or not
String
representation of the input as a currencypublic static final Function<Double,String> toPercentStr()
A String
representing a percentage is created from the target number.
public static final Function<Double,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
groupingUsed
- whether or not grouping will be used
public static final Function<Double,String> toPercentStr(Locale locale)
A String
representing a percentage is created from the target number
in the given Locale
locale
- the Locale
to be used
public static final Function<Double,String> toPercentStr(String locale)
A String
representing a percentage is created from the target number
in the given locale
locale
- the locale to be used
public static final Function<Double,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.
locale
- the Locale
to be usedgroupingUsed
- whether or not grouping will be used
public static final Function<Double,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.
locale
- the locale to be usedgroupingUsed
- whether or not grouping will be used
public static final Function<Double,String> toPercentStr(Locale locale, int minIntegerDigits, int minFractionDigits, int maxFractionDigits, boolean groupingUsed)
A String
representing a percentage is created from the target number
in the given Locale
.
If necessary, it will add leading or trailing zeros to the string
based on the given parameters.
locale
- the Locale
to be usedminIntegerDigits
- minimum number of integer digits so, if not enough in the
target number, 0's will be added to the left of the integer partminFractionDigits
- minimum number of fraction digits so, if not enough in the
target number, 0's will be added to the right of the decimal partmaxFractionDigits
- maximum number of fraction digitsgroupingUsed
- whether or not grouping will be used
public static final Function<Double,String> toPercentStr(String locale, int minIntegerDigits, int minFractionDigits, int maxFractionDigits, boolean groupingUsed)
A String
representing a percentage is created from the target number
in the given locale.
If necessary, it will add leading or trailing zeros to the string
based on the given parameters.
locale
- the locale to be usedminIntegerDigits
- minimum number of integer digits so, if not enough in the
target number, 0's will be added to the left of the integer partminFractionDigits
- minimum number of fraction digits so, if not enough in the
target number, 0's will be added to the right of the decimal partmaxFractionDigits
- maximum number of fraction digitsgroupingUsed
- whether or not grouping will be used
public static final Function<Double,String> toPercentStr(Locale locale, int minIntegerDigits, int minFractionDigits, int maxFractionDigits, char groupingSeparator, char decimalSeparator, boolean decimalSeparatorAlwaysShown)
A String
representing a percentage is created from the target number
in the given Locale
and using the other given parameters as well.
If necessary, it will add leading or trailing zeros to the string
based on the given parameters.
locale
- the Locale
to be usedminIntegerDigits
- minimum number of integer digits so, if not enough in the
target number, 0's will be added to the left of the integer partminFractionDigits
- minimum number of fraction digits so, if not enough in the
target number, 0's will be added to the right of the decimal partmaxFractionDigits
- maximum number of fraction digitsgroupingSeparator
- grouping separator to be useddecimalSeparator
- decimal separator to be useddecimalSeparatorAlwaysShown
- whether decimal separator should be shown
even if the decimal part is zero or not
public static final Function<Double,String> toPercentStr(Locale locale, int minIntegerDigits, int minFractionDigits, int maxFractionDigits, boolean groupingUsed, char decimalSeparator, boolean decimalSeparatorAlwaysShown)
A String
representing a percentage is created from the target number
in the given locale and using the other given parameters as well.
If necessary, it will add leading or trailing zeros to the string
based on the given parameters.
locale
- the locale to be usedminIntegerDigits
- minimum number of integer digits so, if not enough in the
target number, 0's will be added to the left of the integer partminFractionDigits
- minimum number of fraction digits so, if not enough in the
target number, 0's will be added to the right of the decimal partmaxFractionDigits
- maximum number of fraction digitsgroupingUsed
- whether or not grouping will be useddecimalSeparator
- decimal separator to be useddecimalSeparatorAlwaysShown
- whether decimal separator should be shown
even if the decimal part is zero or not
public static final Function<Double,String> toPercentStr(String locale, int minIntegerDigits, int minFractionDigits, int maxFractionDigits, char groupingSeparator, char decimalSeparator, boolean decimalSeparatorAlwaysShown)
A String
representing a percentage is created from the target number
in the given locale and using the other given parameters as well.
If necessary, it will add leading or trailing zeros to the string
based on the given parameters.
locale
- the locale to be usedminIntegerDigits
- minimum number of integer digits so, if not enough in the
target number, 0's will be added to the left of the integer partminFractionDigits
- minimum number of fraction digits so, if not enough in the
target number, 0's will be added to the right of the decimal partmaxFractionDigits
- maximum number of fraction digitsgroupingSeparator
- grouping separator to be useddecimalSeparator
- decimal separator to be useddecimalSeparatorAlwaysShown
- whether decimal separator should be shown
even if the decimal part is zero or not
public static final Function<Double,String> toPercentStr(String locale, int minIntegerDigits, int minFractionDigits, int maxFractionDigits, boolean groupingUsed, char decimalSeparator, boolean decimalSeparatorAlwaysShown)
A String
representing a percentage is created from the target number
in the given locale and using the other given parameters as well.
If necessary, it will add leading or trailing zeros to the string
based on the given parameters.
locale
- the locale to be usedminIntegerDigits
- minimum number of integer digits so, if not enough in the
target number, 0's will be added to the left of the integer partminFractionDigits
- minimum number of fraction digits so, if not enough in the
target number, 0's will be added to the right of the decimal partmaxFractionDigits
- maximum number of fraction digitsgroupingUsed
- whether or not grouping will be useddecimalSeparator
- decimal separator to be useddecimalSeparatorAlwaysShown
- whether decimal separator should be shown
even if the decimal part is zero or not
public static final Function<Double,Boolean> eq(Double object)
Determines whether the target object and the specified object are equal by calling the equals method on the target object.
object
- the Double
to compare to the target
public static final Function<Double,Boolean> eq(double object)
Determines whether the target object and the specified object are equal by calling the equals method on the target object.
object
- the object to compare to the target
public static final Function<Double,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
.
object
- the object to compare to the target
public static final Function<Double,Boolean> eqValue(double 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
.
object
- the object to compare to the target
public static final Function<Double,Boolean> notEq(Double object)
Determines whether the target object and the specified object are NOT equal by calling the equals method on the target object.
object
- the Double
to compare to the target
public static final Function<Double,Boolean> notEq(double object)
Determines whether the target object and the specified object are NOT equal by calling the equals method on the target object.
object
- the object to compare to the target
public static final Function<Double,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
.
object
- the object to compare to the target
public static final Function<Double,Boolean> notEqValue(double 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
.
object
- the object to compare to the target
public static final Function<Double,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
.
object
- the object to compare to the target
public static final Function<Double,Boolean> lessThan(double 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
.
object
- the object to compare to the target
public static final Function<Double,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
.
object
- the object to compare to the target
public static final Function<Double,Boolean> lessOrEqTo(double 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
.
object
- the object to compare to the target
public static final Function<Double,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
.
object
- the object to compare to the target
public static final Function<Double,Boolean> greaterThan(double 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
.
object
- the object to compare to the target
public static final Function<Double,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
.
object
- the object to compare to the target
public static final Function<Double,Boolean> greaterOrEqTo(double 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
.
object
- the object to compare to the target
public static final Function<Double,Boolean> eqBy(IFunction<Double,?> 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.
object
- the object to compare to the target
public static final Function<Double,Boolean> eqValueBy(IFunction<Double,?> 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
.
object
- the object to compare to the target
public static final Function<Double,Boolean> notEqBy(IFunction<Double,?> 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.
object
- the object to compare to the target
public static final Function<Double,Boolean> notEqValueBy(IFunction<Double,?> 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
.
object
- the object to compare to the target
public static final Function<Double,Boolean> lessThanBy(IFunction<Double,?> 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
.
object
- the object to compare to the target
public static final Function<Double,Boolean> lessOrEqToBy(IFunction<Double,?> 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
.
object
- the object to compare to the target
public static final Function<Double,Boolean> greaterThanBy(IFunction<Double,?> 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
.
object
- the object to compare to the target
public static final Function<Double,Boolean> greaterOrEqToBy(IFunction<Double,?> 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
.
object
- the object to compare to the target
public static final Function<Double,Boolean> isNull()
Determines whether the target object is null or not.
public static final Function<Double,Boolean> isNotNull()
Determines whether the target object is null or not.
public static final Function<Iterable<Double>,Double> max()
It returns the maximum number from an Iterable
input object
public static final Function<Iterable<Double>,Double> min()
It returns the minimum number from an Iterable
input object
public static final Function<Iterable<Double>,Double> sum()
It returns the sum of all the numbers in the Iterable
input object
Iterable
public static final Function<Iterable<Double>,Double> avg()
It returns the average of all the numbers in the Iterable
input object
public static final Function<Iterable<Double>,Double> 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
mathContext
- the MathContext
to define RoundingMode
and precision
of the average
public static final Function<Iterable<Double>,Double> 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
roundingMode
- the RoundingMode
to round the average
public static final Function<Double[],Double> maxArray()
It returns the maximum number from the input array
public static final Function<Double[],Double> minArray()
It returns the minimum number from the input array
public static final Function<Double[],Double> sumArray()
It returns the sum of all the numbers in the input array
public static final Function<Double[],Double> avgArray()
It returns the average of all the numbers in the input array
public static final Function<Double[],Double> 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
mathContext
- the MathContext
to define RoundingMode
and precision
of the average
public static final Function<Double[],Double> 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
roundingMode
- the RoundingMode
to round the average
public static final Function<Double,Double> round(MathContext mathContext)
It rounds the input number with the given MathContext
mathContext
- the MathContext
to define RoundingMode
and precision
public static final Function<Double,Double> round(RoundingMode roundingMode)
It rounds the input number with the given RoundingMode
roundingMode
- the RoundingMode
public static final Function<Double,Double> abs()
It returns the absolute value of the input
public static final Function<Double,Double> add(Number add)
It adds the given number to the target and returns the result
add
- value to be added to the target
public static final Function<Double,Double> add(byte add)
It adds the given number to the target and returns the result
add
- value to be added to the target
public static final Function<Double,Double> add(short add)
It adds the given number to the target and returns the result
add
- value to be added to the target
public static final Function<Double,Double> add(int add)
It adds the given number to the target and returns the result
add
- value to be added to the target
public static final Function<Double,Double> add(long add)
It adds the given number to the target and returns the result
add
- value to be added to the target
public static final Function<Double,Double> add(float add)
It adds the given number to the target and returns the result
add
- value to be added to the target
public static final Function<Double,Double> add(double add)
It adds the given number to the target and returns the result
add
- value to be added to the target
public static final Function<Double,Double> subtract(Number subtract)
It subtracts the given number from the target and returns the result
subtract
- number to be subtracted from the target
public static final Function<Double,Double> subtract(byte subtract)
It subtracts the given number from the target and returns the result
subtract
- number to be subtracted from the target
public static final Function<Double,Double> subtract(short subtract)
It subtracts the given number from the target and returns the result
subtract
- number to be subtracted from the target
public static final Function<Double,Double> subtract(int subtract)
It subtracts the given number from the target and returns the result
subtract
- number to be subtracted from the target
public static final Function<Double,Double> subtract(long subtract)
It subtracts the given number from the target and returns the result
subtract
- number to be subtracted from the target
public static final Function<Double,Double> subtract(float subtract)
It subtracts the given number from the target and returns the result
subtract
- number to be subtracted from the target
public static final Function<Double,Double> subtract(double subtract)
It subtracts the given number from the target and returns the result
subtract
- number to be subtracted from the target
public static final Function<Double,Double> divideBy(Number divisor)
It divides the target element by the given divisor and returns its result
divisor
- the divisor
public static final Function<Double,Double> divideBy(byte divisor)
It divides the target element by the given divisor and returns its result
divisor
- the divisor
public static final Function<Double,Double> divideBy(short divisor)
It divides the target element by the given divisor and returns its result
divisor
- the divisor
public static final Function<Double,Double> divideBy(int divisor)
It divides the target element by the given divisor and returns its result
divisor
- the divisor
public static final Function<Double,Double> divideBy(long divisor)
It divides the target element by the given divisor and returns its result
divisor
- the divisor
public static final Function<Double,Double> divideBy(float divisor)
It divides the target element by the given divisor and returns its result
divisor
- the divisor
public static final Function<Double,Double> divideBy(double divisor)
It divides the target element by the given divisor and returns its result
divisor
- the divisor
public static final Function<Double,Double> 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
divisor
- the divisormathContext
- the MathContext
to define RoundingMode
and precision
public static final Function<Double,Double> 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
divisor
- the divisormathContext
- the MathContext
to define RoundingMode
and precision
public static final Function<Double,Double> 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
divisor
- the divisormathContext
- the MathContext
to define RoundingMode
and precision
public static final Function<Double,Double> 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
divisor
- the divisormathContext
- the MathContext
to define RoundingMode
and precision
public static final Function<Double,Double> 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
divisor
- the divisormathContext
- the MathContext
to define RoundingMode
and precision
public static final Function<Double,Double> 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
divisor
- the divisormathContext
- the MathContext
to define RoundingMode
and precision
public static final Function<Double,Double> 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
divisor
- the divisormathContext
- the MathContext
to define RoundingMode
and precision
public static final Function<Double,Double> 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
divisor
- the divisorroundingMode
- the RoundingMode
public static final Function<Double,Double> 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
divisor
- the divisorroundingMode
- the RoundingMode
public static final Function<Double,Double> 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
divisor
- the divisorroundingMode
- the RoundingMode
public static final Function<Double,Double> 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
divisor
- the divisorroundingMode
- the RoundingMode
public static final Function<Double,Double> 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
divisor
- the divisorroundingMode
- the RoundingMode
public static final Function<Double,Double> 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
divisor
- the divisorroundingMode
- the RoundingMode
public static final Function<Double,Double> 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
divisor
- the divisorroundingMode
- the RoundingMode
public static final Function<Double,Double> remainder(Number divisor)
It divides the target element by the given divisor and returns the remainder (target % divisor)
divisor
- the divisor
public static final Function<Double,Double> remainder(byte divisor)
It divides the target element by the given divisor and returns the remainder (target % divisor)
divisor
- the divisor
public static final Function<Double,Double> remainder(short divisor)
It divides the target element by the given divisor and returns the remainder (target % divisor)
divisor
- the divisor
public static final Function<Double,Double> remainder(int divisor)
It divides the target element by the given divisor and returns the remainder (target % divisor)
divisor
- the divisor
public static final Function<Double,Double> remainder(long divisor)
It divides the target element by the given divisor and returns the remainder (target % divisor)
divisor
- the divisor
public static final Function<Double,Double> remainder(float divisor)
It divides the target element by the given divisor and returns the remainder (target % divisor)
divisor
- the divisor
public static final Function<Double,Double> remainder(double divisor)
It divides the target element by the given divisor and returns the remainder (target % divisor)
divisor
- the divisor
public static final Function<Double,Double> remainder(Number divisor, MathContext mathContext)
It divides the target element by the given divisor and returns the
remainder (target % divisor). The remainder precision and RoundingMode
is specified by the given MathContext
divisor
- the divisormathContext
- the MathContext
to define RoundingMode
and precision
public static final Function<Double,Double> remainder(byte divisor, MathContext mathContext)
It divides the target element by the given divisor and returns the
remainder (target % divisor). The remainder precision and RoundingMode
is specified by the given MathContext
divisor
- the divisormathContext
- the MathContext
to define RoundingMode
and precision
public static final Function<Double,Double> remainder(short divisor, MathContext mathContext)
It divides the target element by the given divisor and returns the
remainder (target % divisor). The remainder precision and RoundingMode
is specified by the given MathContext
divisor
- the divisormathContext
- the MathContext
to define RoundingMode
and precision
public static final Function<Double,Double> remainder(int divisor, MathContext mathContext)
It divides the target element by the given divisor and returns the
remainder (target % divisor). The remainder precision and RoundingMode
is specified by the given MathContext
divisor
- the divisormathContext
- the MathContext
to define RoundingMode
and precision
public static final Function<Double,Double> remainder(long divisor, MathContext mathContext)
It divides the target element by the given divisor and returns the
remainder (target % divisor). The remainder precision and RoundingMode
is specified by the given MathContext
divisor
- the divisormathContext
- the MathContext
to define RoundingMode
and precision
public static final Function<Double,Double> remainder(float divisor, MathContext mathContext)
It divides the target element by the given divisor and returns the
remainder (target % divisor). The remainder precision and RoundingMode
is specified by the given MathContext
divisor
- the divisormathContext
- the MathContext
to define RoundingMode
and precision
public static final Function<Double,Double> remainder(double divisor, MathContext mathContext)
It divides the target element by the given divisor and returns the
remainder (target % divisor). The remainder precision and RoundingMode
is specified by the given MathContext
divisor
- the divisormathContext
- the MathContext
to define RoundingMode
and precision
public static final Function<Double,Double> multiplyBy(Number multiplicand)
It multiplies target by multiplicand and returns its value
multiplicand
- the multiplicand
public static final Function<Double,Double> multiplyBy(byte multiplicand)
It multiplies target by multiplicand and returns its value
multiplicand
- the multiplicand
public static final Function<Double,Double> multiplyBy(short multiplicand)
It multiplies target by multiplicand and returns its value
multiplicand
- the multiplicand
public static final Function<Double,Double> multiplyBy(int multiplicand)
It multiplies target by multiplicand and returns its value
multiplicand
- the multiplicand
public static final Function<Double,Double> multiplyBy(long multiplicand)
It multiplies target by multiplicand and returns its value
multiplicand
- the multiplicand
public static final Function<Double,Double> multiplyBy(float multiplicand)
It multiplies target by multiplicand and returns its value
multiplicand
- the multiplicand
public static final Function<Double,Double> multiplyBy(double multiplicand)
It multiplies target by multiplicand and returns its value
multiplicand
- the multiplicand
public static final Function<Double,Double> 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
multiplicand
- the multiplicandmathContext
- the MathContext
to define RoundingMode
and precision
public static final Function<Double,Double> 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
multiplicand
- the multiplicandmathContext
- the MathContext
to define RoundingMode
and precision
public static final Function<Double,Double> 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
multiplicand
- the multiplicandmathContext
- the MathContext
to define RoundingMode
and precision
public static final Function<Double,Double> 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
multiplicand
- the multiplicandmathContext
- the MathContext
to define RoundingMode
and precision
public static final Function<Double,Double> 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
multiplicand
- the multiplicandmathContext
- the MathContext
to define RoundingMode
and precision
public static final Function<Double,Double> 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
multiplicand
- the multiplicandmathContext
- the MathContext
to define RoundingMode
and precision
public static final Function<Double,Double> 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
multiplicand
- the multiplicandmathContext
- the MathContext
to define RoundingMode
and precision
public static final Function<Double,Double> multiplyBy(Number multiplicand, RoundingMode roundingMode)
It multiplies target by multiplicand and returns its value. The result is
rounded based on the given RoundingMode
multiplicand
- the multiplicandroundingMode
- the RoundingMode
public static final Function<Double,Double> multiplyBy(byte multiplicand, RoundingMode roundingMode)
It multiplies target by multiplicand and returns its value. The result is
rounded based on the given RoundingMode
multiplicand
- the multiplicandroundingMode
- the RoundingMode
public static final Function<Double,Double> multiplyBy(short multiplicand, RoundingMode roundingMode)
It multiplies target by multiplicand and returns its value. The result is
rounded based on the given RoundingMode
multiplicand
- the multiplicandroundingMode
- the RoundingMode
public static final Function<Double,Double> multiplyBy(int multiplicand, RoundingMode roundingMode)
It multiplies target by multiplicand and returns its value. The result is
rounded based on the given RoundingMode
multiplicand
- the multiplicandroundingMode
- the RoundingMode
public static final Function<Double,Double> multiplyBy(long multiplicand, RoundingMode roundingMode)
It multiplies target by multiplicand and returns its value. The result is
rounded based on the given RoundingMode
multiplicand
- the multiplicandroundingMode
- the RoundingMode
public static final Function<Double,Double> multiplyBy(float multiplicand, RoundingMode roundingMode)
It multiplies target by multiplicand and returns its value. The result is
rounded based on the given RoundingMode
multiplicand
- the multiplicandroundingMode
- the RoundingMode
public static final Function<Double,Double> multiplyBy(double multiplicand, RoundingMode roundingMode)
It multiplies target by multiplicand and returns its value. The result is
rounded based on the given RoundingMode
multiplicand
- the multiplicandroundingMode
- the RoundingMode
public static final Function<Double,Double> pow(int power)
It performs the operation targetpower and returns its value
power
- the power to raise the target to
public static final Function<Double,Double> 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
power
- the power to raise the target tomathContext
- the MathContext
to specify precision and RoundingMode
public static final Function<Double,Double> pow(int power, RoundingMode roundingMode)
It performs the operation targetpower and returns its value. The result
rounding mode is specified by the given RoundingMode
power
- the power to raise the target toroundingMode
- the RoundingMode
public static final Function<Double,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
.
min
- the minimum value of the targetmax
- the maximum value of the target
public static final Function<Double,Boolean> between(double min, double 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
.
min
- the minimum value of the targetmax
- the maximum value of the target
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |