org.ephman.utils
Class Prime

java.lang.Object
  |
  +--org.ephman.utils.Prime

public class Prime
extends java.lang.Object

A class which will compute primes and test if a number is prime

Version:
1.0
Author:
Paul M. Bethe

Constructor Summary
Prime()
           
 
Method Summary
static boolean isPrime(int n)
          Detemines if an int is prime
static int primeAfter(int n)
          Takes an int and returns the first prime >= 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

primeAfter

public static int primeAfter(int n)
Takes an int and returns the first prime >= n

Parameters:
n - the starting place

isPrime

public static boolean isPrime(int n)
Detemines if an int is prime

Parameters:
n - the number to test
Returns:
true/false