Package ghidra.util.datastruct

# Class Prime

java.lang.Object
ghidra.util.datastruct.Prime

public final class Prime extends 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

  Modifier and Type
  Method
  Description
  `static final 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 Details

  - ### Prime

    public Prime()

- ## Method Details

  - ### 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.