Class Prime


  • public final class Prime
    extends java.lang.Object
    Class that provides a static nextPrime method that gives out prime numbers that are useful in a buffer doubling strategy with all buffer sizes being prime.
    • Constructor Summary

      Constructors 
      Constructor Description
      Prime()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int nextPrime​(int n)
      Finds the next prime number greater than or equal to n.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Prime

        public Prime()
    • Method Detail

      • nextPrime

        public static final int nextPrime​(int n)
        Finds the next prime number greater than or equal to n.
        Parameters:
        n - the number from which to find the next higher prime number.