|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oo.Mattress1
public class Mattress1
A mattress and its orientations; the mattress's state (its orientation) is implemented with three booleans.
To, after a ... | ||||
---|---|---|---|---|
From | pitch | roll | yaw | |
FLB | HLT | FRT | HRB | |
FRT | HRB | FLB | HLT | |
HLT | FLB | HRB | FRT | |
HRB | FRT | HLT | FLB |
The FLB, FRT, etc. codes in the table above are interpreted as follows:
Code | Meaning |
---|---|
B | Bottom is green |
F | Foot is red |
H | Head is red |
L | Left is blue |
R | Right is blue |
T | Top is green |
Constructor Summary | |
---|---|
Mattress1()
Constructs a mattress with red-end at top, blue-end at left, and green-surface at top. |
Method Summary | |
---|---|
boolean |
headRed()
True iff the red end is at the top. |
boolean |
leftBlue()
True iff the blue side is at the left. |
PRYable |
pitch()
Pitches the thing a half-turn (180 degrees). |
PRYable |
roll()
Rolls the thing a half-turn (180 degrees). |
boolean |
topGreen()
True iff the green surface is on the top. |
java.lang.String |
toString()
A string representing the orientation, matching [HF][LR][TB]. The string contains H if headRed() and F otherwise; L if leftBlue() and R otherwise; and T if topGreen() and B otherwise. |
PRYable |
yaw()
Yaws the thing a half-turn (180 degrees). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Mattress1()
Method Detail |
---|
public java.lang.String toString()
HasHLT
toString
in interface HasHLT
toString
in class java.lang.Object
public boolean headRed()
HasHLT
headRed
in interface HasHLT
public boolean leftBlue()
HasHLT
leftBlue
in interface HasHLT
public boolean topGreen()
HasHLT
topGreen
in interface HasHLT
public PRYable pitch()
PRYable
pitch
in interface PRYable
public PRYable roll()
PRYable
roll
in interface PRYable
public PRYable yaw()
PRYable
yaw
in interface PRYable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |