View Javadoc

1   /*$Id: SampleJavaClassApplications.java,v 1.4 2004/07/26 10:21:47 nw Exp $
2    * Created on 08-Jun-2004
3    *
4    * Copyright (C) AstroGrid. All rights reserved.
5    *
6    * This software is published under the terms of the AstroGrid 
7    * Software License version 1.2, a copy of which has been included 
8    * with this distribution in the LICENSE.txt file.  
9    *
10  **/
11  package org.astrogrid.applications.javaclass;
12  
13  import org.apache.commons.logging.Log;
14  import org.apache.commons.logging.LogFactory;
15  
16  /*** Sample class of static methods, to use as java 'applications'
17   * @author Noel Winstanley nw@jb.man.ac.uk 08-Jun-2004
18   *
19   */
20  public class SampleJavaClassApplications {
21      /***
22       * Commons Logger for this class
23       */
24      private static final Log logger = LogFactory
25          .getLog(SampleJavaClassApplications.class);
26  
27      /*** Static methods - so no public constructor
28       * 
29       */
30      private SampleJavaClassApplications() {
31          super();
32      }
33      /*** the classic */
34      public static String helloWorld() {
35          return "Hello World!";
36      }
37      
38      /*** say hello to someone */
39      public static String helloYou(String who) {
40          return "Hello " + who;
41      }
42      /*** add two numbers */
43      public static int sum(int a, int b) {
44          logger.info("Summing " + a + " and " + b);
45          return a + b;
46      }
47          
48  }
49  
50  
51  /* 
52  $Log: SampleJavaClassApplications.java,v $
53  Revision 1.4  2004/07/26 10:21:47  nw
54  javadoc
55  
56  Revision 1.3  2004/07/22 16:32:54  nw
57  cleaned up application / parameter adapter interface.
58  
59  Revision 1.2  2004/07/01 11:16:22  nw
60  merged in branch
61  nww-itn06-componentization
62  
63  Revision 1.1.2.2  2004/07/01 01:42:46  nw
64  final version, before merge
65  
66  Revision 1.1.2.1  2004/06/14 08:56:58  nw
67  factored applications into sub-projects,
68  got packaging of wars to work again
69   
70  */