|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwiiremotej.MassConstants
public class MassConstants
Contains mass constants for use in BBBalanceEvents. Immutable.
Field Summary | |
---|---|
static int |
BOTTOM
Constant indicating the bottom row on the balance board. |
static int |
LEFT
Constant indicating the left column on the balance board. |
static int |
RIGHT
Constant indicating the right column on the balance board. |
static int |
SEVENTEEN
Constant indicating the value for seventeen kilograms. |
static int |
THIRTY_FOUR
Constant indicating the value for thirty-four kilograms. |
static int |
TOP
Constant indicating the top row on the balance board. |
static int |
ZERO
Constant indicating the value for zero kilograms. |
Constructor Summary | |
---|---|
MassConstants(double[] constantsIn)
Creates new MassConstants with the given mass constants. |
Method Summary | |
---|---|
double |
value(int row,
int col,
int mass)
Returns the constant value specified by the given row, column, and mass. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TOP
public static final int BOTTOM
public static final int RIGHT
public static final int LEFT
public static final int ZERO
public static final int SEVENTEEN
public static final int THIRTY_FOUR
Constructor Detail |
---|
public MassConstants(double[] constantsIn)
constantsIn
- a list of the various constant values used to convert raw balance board data to kilograms. The order is like so:
Top Right 0kg, Bottom Right 0kg, Top Left 0kg, Bottom Left 0kg, Top Right 17kg, Bottom Right 17kg, Top Left 17kg,
Bottom Left 17kg, Top Right 34kg, Bottom Right 34kg, Top Left 34kg, Bottom Left 34kg.Method Detail |
---|
public double value(int row, int col, int mass)
row
- must be one of either TOP or BOTTOM.col
- must be one of either RIGHT or LEFT.mass
- must be one of ZERO, SEVENTEEN, THIRTY_FOUR.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |