package org.anderes.edu.di;

import static java.lang.Math.sqrt;

import java.util.stream.LongStream;

import com.google.inject.Singleton;

@Singleton
public class PrimeNumberService implements Service {

    @Override
    public Boolean isPrimeNumber(final Integer number) {
        return number > 1 && LongStream.rangeClosed(2, (long)sqrt(number)).noneMatch(divisor -> number % divisor == 0);
    }

}

@@ -112,18 +112,13 @@
 ort 
-com.google
+javax
 .inj

Import javax. verwendte