1 /*
2 * @(#)$Id: Direction.java 689 2009-07-22 00:10:27Z bsigner $
3 *
4 * Author : Ueli Kurmann, igesture@uelikurmann.ch
5 *
6 * Purpose : Directions used by the Siger algorithm.
7 *
8 * -----------------------------------------------------------------------
9 *
10 * Revision Information:
11 *
12 * Date Who Reason
13 *
14 * Dec 6, 2006 ukurmann Initial Release
15 * Mar 16, 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.siger;
28
29 /**
30 * Directions used by the Siger algorithm.
31 *
32 * @version 1.0 Dec 2006
33 * @author Ueli Kurmann, igesture@uelikurmann.ch
34 * @author Beat Signer, signer@inf.ethz.ch
35 */
36 public enum Direction {
37 N, NE, E, SE, S, SW, W, NW;
38
39 public static Direction parse(String s) {
40 for (final Direction d : Direction.values()) {
41
42 if (d.name().equals(s.trim())) {
43 return d;
44 }
45
46 }
47 return null;
48 } // parse
49
50 }