View Javadoc

1   package net.sf.josceleton.core.api.entity.joint;
2   
3   
4   /**
5    * Provides a set of interfaces representing subtypes of {@link Joint}.
6    * 
7    * These so-called <i>enum interfaces</i> represent some kind of <i>namespace</i>.
8    * 
9    * @since 0.1
10   */
11  public final class JointParts {
12  	
13  	private JointParts() {
14  		// not instantiable
15  	}
16  	
17      /* MAIN JOINTS                                                         */
18      /* ******************************************************************* */
19  
20  	/** @since 0.1 */
21  	public interface Head extends Joint { /* marker interface */ }
22  	
23  	/** @since 0.1 */
24  	public interface Neck extends Joint { /* marker interface */ }
25  	
26  	/** @since 0.1 */
27  	public interface Torso extends Joint { /* marker interface */ }
28  
29      /* SHOULDERS                                                           */
30      /* ******************************************************************* */
31  	
32  	/** @since 0.1 */
33  	public interface Shoulder extends Joint { /* marker interface */ }
34  	
35  	/** @since 0.1 */
36  	public interface LeftShoulder extends LeftJoint<Shoulder>, Shoulder { /* marker interface */ }
37  	
38  	/** @since 0.1 */
39  	public interface RightShoulder extends RightJoint<Shoulder>, Shoulder { /* marker interface */ }
40  	
41  	/** @since 0.1 */
42  	public interface Shoulders extends SymetricJoint<Shoulder, LeftShoulder, RightShoulder> { /* marker interface*/ }
43  
44      /* ELBOW                                                               */
45      /* ******************************************************************* */
46  	
47  	/** @since 0.1 */
48  	public interface Elbow extends Joint { /* marker interface */ }
49  	
50  	/** @since 0.1 */
51  	public interface LeftElbow extends LeftJoint<Elbow>, Elbow { /* marker interface */ }
52  	
53  	/** @since 0.1 */
54  	public interface RightElbow extends RightJoint<Elbow>, Elbow { /* marker interface */ }
55  	
56  	/** @since 0.1 */
57  	public interface Elbows extends SymetricJoint<Elbow, LeftElbow, RightElbow> { /* marker interface */ }
58  
59      /* HANDS                                                               */
60      /* ******************************************************************* */
61  	
62  	/** @since 0.1 */
63  	public interface Hand extends Joint { /* marker interface */ }
64  	
65  	/** @since 0.1 */
66  	public interface LeftHand extends LeftJoint<Hand>, Hand { /* marker interface */ }
67  	
68  	/** @since 0.1 */
69  	public interface RightHand extends RightJoint<Hand>, Hand { /* marker interface */ }
70  	
71  	/** @since 0.1 */
72  	public interface Hands extends SymetricJoint<Hand, LeftHand, RightHand> { /* marker interface */ }
73  
74      /* HIPS                                                                */
75      /* ******************************************************************* */
76  	
77  	/** @since 0.1 */
78  	public interface Hip extends Joint { /* marker interface */ }
79  	
80  	/** @since 0.1 */
81  	public interface LeftHip extends LeftJoint<Hip>, Hip { /* marker interface */ }
82  	
83  	/** @since 0.1 */
84  	public interface RightHip extends RightJoint<Hip>, Hip { /* marker interface */ }
85  	
86  	/** @since 0.1 */
87  	public interface Hips extends SymetricJoint<Hip, LeftHip, RightHip> { /* marker interface */ }
88  
89      /* KNEES                                                               */
90      /* ******************************************************************* */
91  	
92  	/** @since 0.1 */
93  	public interface Knee extends Joint { /* marker interface */ }
94  	
95  	/** @since 0.1 */
96  	public interface LeftKnee extends LeftJoint<Knee>, Knee { /* marker interface */ }
97  	
98  	/** @since 0.1 */
99  	public interface RightKnee extends RightJoint<Knee>, Knee { /* marker interface */ }
100 	
101 	/** @since 0.1 */
102 	public interface Knees extends SymetricJoint<Knee, LeftKnee, RightKnee> { /* marker interface */ }
103 
104     /* ANKLES                                                              */
105     /* ******************************************************************* */
106 	
107 	/** @since 0.1 */
108 	public interface Ankle extends Joint { /* marker interface */ }
109 	
110 	/** @since 0.1 */
111 	public interface LeftAnkle extends LeftJoint<Ankle>, Ankle { /* marker interface */ }
112 	
113 	/** @since 0.1 */
114 	
115 	public interface RightAnkle extends RightJoint<Ankle>, Ankle { /* marker interface */ }
116 	
117 	/** @since 0.1 */
118 	public interface Ankles extends SymetricJoint<Ankle, LeftAnkle, RightAnkle> { /* marker interface */ }
119 
120     /* FEET                                                                */
121     /* ******************************************************************* */
122 	
123 	/** @since 0.1 */
124 	public interface Foot extends Joint { /* marker interface */ }
125 	
126 	/** @since 0.1 */
127 	public interface LeftFoot extends LeftJoint<Foot>, Foot { /* marker interface */ }
128 	
129 	/** @since 0.1 */
130 	public interface RightFoot extends RightJoint<Foot>, Foot { /* marker interface */ }
131 	
132 	/** @since 0.1 */
133 	public interface Feet extends SymetricJoint<Foot, LeftFoot, RightFoot> { /* marker interface */ }
134 
135 
136 	interface LeftJoint<J> {
137 		// marker interface only
138 	}
139 	interface RightJoint<J> {
140 		// marker interface only
141 	}
142 
143 	interface SymetricJoint<J, LJ extends LeftJoint<J>, RJ extends RightJoint<J>> {
144 
145 		/** This is part of the API as it will be visibile to user. */
146 		LJ LEFT();
147 		
148 		/** This is part of the API as it will be visibile to user. */
149 		RJ RIGHT();
150 		
151 	}
152 	
153 }