|
15 | 15 | public interface Outlet extends HomekitAccessory { |
16 | 16 |
|
17 | 17 | @Override |
18 | | - default public Collection<Service> getServices() { |
| 18 | + default Collection<Service> getServices() { |
19 | 19 | return Collections.singleton(new OutletService(this)); |
20 | 20 | } |
21 | 21 |
|
22 | 22 | /** |
23 | 23 | * Retrieves the current binary state of the outlet's power. |
24 | 24 | * @return a future that will contain the binary state |
25 | 25 | */ |
26 | | - public CompletableFuture<Boolean> getPowerState(); |
| 26 | + CompletableFuture<Boolean> getPowerState(); |
27 | 27 |
|
28 | 28 | /** |
29 | 29 | * Retrieves the current binary state indicating whether the outlet is in use. |
30 | 30 | * @return a future that will contain the binary state |
31 | 31 | */ |
32 | | - public CompletableFuture<Boolean> getOutletInUse(); |
| 32 | + CompletableFuture<Boolean> getOutletInUse(); |
33 | 33 |
|
34 | 34 | /** |
35 | 35 | * Sets the binary state of the outlet's power. |
36 | 36 | * @param state the binary state to set |
37 | 37 | * @return a future that completes when the change is made |
38 | 38 | * @throws Exception when the change cannot be made |
39 | 39 | */ |
40 | | - public CompletableFuture<Void> setPowerState(boolean state) throws Exception; |
| 40 | + CompletableFuture<Void> setPowerState(boolean state) throws Exception; |
41 | 41 |
|
42 | 42 | /** |
43 | 43 | * Subscribes to changes in the binary state of the outlet's power. |
44 | 44 | * @param callback the function to call when the state changes. |
45 | 45 | */ |
46 | | - public void subscribePowerState(HomekitCharacteristicChangeCallback callback); |
| 46 | + void subscribePowerState(HomekitCharacteristicChangeCallback callback); |
47 | 47 |
|
48 | 48 | /** |
49 | 49 | * Subscribes to changes in the binary state indicating whether the outlet is in use. |
50 | 50 | * @param callback the function to call when the state changes. |
51 | 51 | */ |
52 | | - public void subscribeOutletInUse(HomekitCharacteristicChangeCallback callback); |
| 52 | + void subscribeOutletInUse(HomekitCharacteristicChangeCallback callback); |
53 | 53 |
|
54 | 54 | /** |
55 | 55 | * Unsubscribes from changes in the binary state of the outlet's power. |
56 | 56 | */ |
57 | | - public void unsubscribePowerState(); |
| 57 | + void unsubscribePowerState(); |
58 | 58 |
|
59 | 59 | /** |
60 | 60 | * Unsubscribes from changes in the binary state indicating whether hte outlet is in use. |
61 | 61 | */ |
62 | | - public void unsubscribeOutletInUse(); |
| 62 | + void unsubscribeOutletInUse(); |
63 | 63 |
|
64 | 64 | } |
0 commit comments