MassConstants
Keywords: wiiremotej.MassConstants class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## wiiremotej
Class MassConstants

    java.lang.Object
      wiiremotej.MassConstants

    public class MassConstants

extends java.lang.Object

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

### TOP

    public static final int TOP

  Constant indicating the top row on the balance board. The top row is opposite the power button.

  See Also:
    Constant Field Values

### BOTTOM

    public static final int BOTTOM

  Constant indicating the bottom row on the balance board.

  See Also:
    Constant Field Values

### RIGHT

    public static final int RIGHT

  Constant indicating the right column on the balance board.

  See Also:
    Constant Field Values

### LEFT

    public static final int LEFT

  Constant indicating the left column on the balance board.

  See Also:
    Constant Field Values

### ZERO

    public static final int ZERO

  Constant indicating the value for zero kilograms.

  See Also:
    Constant Field Values

### SEVENTEEN

    public static final int SEVENTEEN

  Constant indicating the value for seventeen kilograms.

  See Also:
    Constant Field Values

### THIRTY_FOUR

    public static final int THIRTY_FOUR

  Constant indicating the value for thirty-four kilograms.

  See Also:
    Constant Field Values

Constructor Detail

### MassConstants

    public MassConstants(double[] constantsIn)

  Creates new MassConstants with the given mass constants.

  Parameters:
    `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

### value

    public double value(int row,
                        int col,
                        int mass)

  Returns the constant value specified by the given row, column, and mass.

  Parameters:
    `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.
  Returns:
    the specified constant value.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD