KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > proactive > examples > eratosthenes > PrimeNumber


1 package org.objectweb.proactive.examples.eratosthenes;
2
3 /*
4 * ################################################################
5 *
6 * ProActive: The Java(TM) library for Parallel, Distributed,
7 * Concurrent computing with Security and Mobility
8 *
9 * Copyright (C) 1997-2002 INRIA/University of Nice-Sophia Antipolis
10 * Contact: proactive-support@inria.fr
11 *
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation; either
15 * version 2.1 of the License, or any later version.
16 *
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
21 *
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
25 * USA
26 *
27 * Initial developer(s): The ProActive Team
28 * http://www.inria.fr/oasis/ProActive/contacts.html
29 * Contributor(s):
30 *
31 * ################################################################
32 */

33
34 /**
35 * @author Jonathan Streit
36 *
37 * Interface for a prime number. It is implemented by PrimeNumberImpl as well
38 * as by ActivePrimeContainer, who forwards requests to its first member.
39 *
40 */

41 public interface PrimeNumber {
42
43     /** Tries whether n is dividible by the value of this prime number and
44      * continues with the next prime number if this is not the case */

45     public void tryModulo(long n);
46     
47     /** Returns the value of this prime number. */
48     public long getValue();
49
50 }
51
Popular Tags