Primes class
Prime number generator.
Maintains an internal list of prime numbers, which it uses to generate new prime numbers.
Constructors
- Primes()
Properties
Methods
-
addPrime(
) → int - Adds the next prime and returns it.
-
getPrime(
int i) → int -
Returns the
i
th prime number. -
internalIsPrime(
int oddN) → bool -
Returns whether
oddN
is prime, assuming it's an odd number. This is only public for testing. Use the public isPrime function instead. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited