@Override
    public Boolean value(final Long input) {
        if (input < this._primes.get(1L))
            return false;
        long largestKnownPrime = this._primes.size();
        largestKnownPrime = this._primes.get(largestKnownPrime);
        if (largestKnownPrime <= input) {
            for (long pc = largestKnownPrime + 2; pc <= input + 1; pc += 2) {
                boolean isPrime = true;
                for (Entry<Long, Long> p: this._primes.entrySet()) {
                    isPrime &= pc % p.getValue() != 0;
                    if (!isPrime)
                        break;
                }
                if (isPrime)
                    this._primes.put(this._primes.size() + 1L, pc);
            }
        }
        return this._primes.containsValue(input);
    }