public class PrimesCache extends Object
Constructor and Description |
---|
PrimesCache()
Default constructor - setting prime cache for a default range if integers
|
Modifier and Type | Method and Description |
---|---|
boolean |
getCacheStatus()
Returns cache status
|
double |
getComputingTime()
Returns computing time of Eratosthenes Sieve
|
int |
getMaxNumInCache()
Returns cache range.
|
int |
getNumberOfPrimes()
Returns number of found primes.
|
boolean |
isInitSuccessful()
Returns true in case when primes cache initialization was successful,
otherwise returns false.
|
int |
primeTest(int n)
Check whether given number is prime
|
public PrimesCache()
public double getComputingTime()
public boolean getCacheStatus()
public int getNumberOfPrimes()
public int getMaxNumInCache()
public int primeTest(int n)
n
- Given integer number.public boolean isInitSuccessful()