|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.jaulp.math.MathUtils
public class MathUtils
Utility class for the use numbers.
| Constructor Summary | |
|---|---|
MathUtils()
|
|
| Method Summary | |
|---|---|
static int[] |
getPrimeNumbers(int quantity)
Gets the prime numbers for the given quantity. |
static boolean |
isBetween(int min,
int max,
int index)
Checks the given index is between the range from min and max. |
static boolean |
isInRange(int min,
int max,
int number)
Checks the given number is in range from min and max. |
static boolean |
isNegative(int number)
Checks if the number is negative. |
static boolean |
isPositive(int number)
Checks if the number is positive. |
static boolean |
isPrimeNumber(int number)
Checks if the number is a prime number. |
static int[] |
printAllPrimeNumbersTill(int noOfPrimes)
Prints all prime numbers till the given number. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MathUtils()
| Method Detail |
|---|
public static boolean isPositive(int number)
number - The number.
public static boolean isNegative(int number)
number - The number.
public static boolean isPrimeNumber(int number)
number - The number.
public static int[] printAllPrimeNumbersTill(int noOfPrimes)
noOfPrimes - The limit.
public static boolean isBetween(int min,
int max,
int index)
min - The minimum.max - The maximum.index - The index.
public static boolean isInRange(int min,
int max,
int number)
min - The minimum.max - The maximum.number - The index.
public static int[] getPrimeNumbers(int quantity)
quantity - The quantity.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||