Primes class

Prime number generator.

Maintains an internal list of prime numbers, which it uses to generate new prime numbers.

Constructors

Primes()

Properties

hashCode int
The hash code for this object.
no setterinherited
numPrimes int
Returns the number of primes that are currently cached.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addPrime() int
Adds the next prime and returns it.
getPrime(int i) int
Returns the ith 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