View Javadoc

1   /*
2    * @(#)$Id: DefaultAlgorithm.java 689 2009-07-22 00:10:27Z bsigner $
3    *
4    * Author		:	Ueli Kurmann, igesture@uelikurmann.ch
5    *
6    * Purpose		: 	Default implementation of the algorithm interface.
7    *
8    * -----------------------------------------------------------------------
9    *
10   * Revision Information:
11   *
12   * Date				Who			Reason
13   *
14   * Dec 11, 2006     ukurmann	Initial Release
15   * Mar 15, 2007     bsigner     Cleanup
16   *
17   * -----------------------------------------------------------------------
18   *
19   * Copyright 1999-2009 ETH Zurich. All Rights Reserved.
20   *
21   * This software is the proprietary information of ETH Zurich.
22   * Use is subject to license terms.
23   * 
24   */
25  
26  
27  package org.ximtec.igesture.algorithm;
28  
29  import java.util.HashMap;
30  import java.util.Map;
31  
32  
33  /**
34   * Default implementation of the algorithm interface.
35   * 
36   * @version 1.0 Dec 2006
37   * @author Ueli Kurmann, igesture@uelikurmann.ch
38   * @author Beat Signer, signer@inf.ethz.ch
39   */
40  public abstract class DefaultAlgorithm implements Algorithm {
41  
42     protected static Map<String, String> DEFAULT_CONFIGURATION = new HashMap<String, String>();
43  
44     /**
45      * Returns the value of the default parameter.
46      * 
47      * @param parameterName the name of the parameter whose default value has to
48      *            be returned.
49      * @return the value of a specific default parameter.
50      */
51     public String getDefaultParameterValue(String parameterName) {
52        return DEFAULT_CONFIGURATION.get(parameterName);
53     } // getDefaultParameterValue
54  
55  }