summaryrefslogtreecommitdiff
path: root/vdrmanager/src/de/bjusystems/vdrmanager/data/WakeupState.java
blob: f7917d830076324c64efc0b63d683aa15eddde15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package de.bjusystems.vdrmanager.data;

public class WakeupState {

	public static WakeupState OK = new WakeupState(0);
	public static WakeupState FAILED = new WakeupState(1);
	public static WakeupState ERROR = new WakeupState(2);

	private final int value;
	private static WakeupState state;

	private WakeupState(final int value) {
		this.value = value;
	}

	public static WakeupState getState() {
		return state;
	}

	public static void setState(final WakeupState state) {
		WakeupState.state = state;
	}

	@Override
	public boolean equals(final Object o) {
		if (!(o instanceof WakeupState)) {
			return false;
		}
		return this.value == ((WakeupState)o).value;
	}

	@Override
	public int hashCode() {
		return Integer.valueOf(value).hashCode();
	}
}