57 |
this.rotation = rotation; |
this.rotation = rotation; |
58 |
} |
} |
59 |
|
|
60 |
|
/** Get the index of <code>rotation</code> among the connections. |
61 |
|
* E.g., when <code>rotation</code> is the first of the connections, |
62 |
|
* then this returns 0; when the rotation is the third connection, |
63 |
|
* this returns 2. |
64 |
|
*/ |
65 |
|
public int getRotationIndex() { |
66 |
|
if(rotation != null) |
67 |
|
return getConnections(1).headSet(rotation).size(); |
68 |
|
else |
69 |
|
return 0; |
70 |
|
} |
71 |
|
|
72 |
/** The posward or negward connections of <code>focus</code> to show, |
/** The posward or negward connections of <code>focus</code> to show, |
73 |
* in order. XXX refactor-- we need only a subset of all properties, |
* in order. XXX refactor-- we need only a subset of all properties, |
74 |
* and recursion... currently slow because we iterate though |
* and recursion... currently slow because we iterate though |