package de.toman.milight;

public class LightState {
	/**
	 * The color which is currently display by the group of lights if the lights
	 * are in colored mode. Otherwise, this is the color used last when the
	 * colored mode was activated. Hue and brightness will be extracted from
	 * here.
	 */
	private MilightColor color;

	/**
	 * True if the group of lights is in white mode, false if it uses the
	 * colored mode.
	 */
	private boolean whiteMode;

	/**
	 * The brightness level between 0 and 1 currently displayed by the group of
	 * lights if they are in white mode. Otherwise, it is the brightness level
	 * used last when the lights were in white mode. The brightness level for
	 * the colored mode is not contained in this variable but at
	 * {@link LightState#color}.
	 */
	private float brightness;
}

@@ -237,61 +237,9 @@
 ted.
- Hue and brightness will be extracted from%0A%09 * here.
 %0A
+
 %09 */
@@ -723,24 +723,24 @@
 olor%7D.%0A%09 */%0A
-
 %09private flo
@@ -753,11 +753,1937 @@
 ghtness;
+%0A%0A%09/**%0A%09 * This constructor creates a new LightState instance which stores the state%0A%09 * of a group of lights.%0A%09 * %0A%09 * @param color%0A%09 *            is the color last displayed in colored mode%0A%09 * @param brightness%0A%09 *            is the brightness value last displayed in white mode (between%0A%09 *            0 and 1)%0A%09 * @param whiteMode%0A%09 *            is true if the lights are currently in white mode and false if%0A%09 *            they are in colored mode%0A%09 * %0A%09 * @throws IllegalArgumentException%0A%09 *             if the brightness value is not between 0 and 1%0A%09 */%0A%09public LightState(MilightColor color, float brightness, boolean whiteMode) %7B%0A%09%09// super constructor%0A%09%09super();%0A%0A%09%09// check arguments%0A%09%09if (0 %3E brightness %7C%7C brightness %3E 1) %7B%0A%09%09%09throw new IllegalArgumentException(%0A%09%09%09%09%09%22The brightness value should be between 0 and 1%22);%0A%09%09%7D%0A%0A%09%09// set attributes%0A%09%09this.color = color;%0A%09%09this.brightness = brightness;%0A%09%09this.whiteMode = whiteMode;%0A%09%7D%0A%0A%09/**%0A%09 * This function returns the color which is currently display by the group%0A%09 * of lights if the lights are in colored mode. Otherwise, this is the color%0A%09 * used last when the colored mode was activated%0A%09 * %0A%09 * @return the color displayed by the lights%0A%09 * @see LightState#isWhiteMode()%0A%09 */%0A%09public MilightColor getColor() %7B%0A%09%09return color;%0A%09%7D%0A%0A%09/**%0A%09 * This function returns whether the group of lights is in white mode.%0A%09 * %0A%09 * @return true if the group of lights is in white mode, false if it uses%0A%09 *         the colored mode%0A%09 */%0A%09public boolean isWhiteMode() %7B%0A%09%09return whiteMode;%0A%09%7D%0A%0A%09/**%0A%09 * This function returns the brightness level between 0 and 1 currently%0A%09 * displayed by the group of lights if they are in white mode. Otherwise, it%0A%09 * is the brightness level used last when the lights were in white mode.%0A%09 * %0A%09 * @return the brightness level between 0 and 1%0A%09 * @see LightState#isWhiteMode()%0A%09 */%0A%09public float getBrightness() %7B%0A%09%09return brightness;%0A%09%7D
 %0A%7D%0A

add getters and constructor for LightState