Skip to content

Commit

Permalink
Eclipse save-autoformat applied; indentation corrected, no logic chan…
Browse files Browse the repository at this point in the history
…ges (#130)
  • Loading branch information
climategadgets committed May 18, 2021
1 parent 2ea3c77 commit c0e1cec
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/**
* Base logic for the damper controller.
*
* @author Copyright &copy; <a href="mailto:vt@freehold.crocodile.org">Vadim Tkachenko</a> 2001-2018
* @author Copyright &copy; <a href="mailto:vt@homeclimatecontrol.com">Vadim Tkachenko</a> 2001-2020
*/
public abstract class AbstractDamperController extends LogAware implements DamperController, JmxAware {

Expand All @@ -42,12 +42,12 @@ public abstract class AbstractDamperController extends LogAware implements Dampe
/**
* Association from a thermostat to a damper.
*/
protected final Map<Thermostat, Damper> ts2damper = new HashMap<Thermostat, Damper>();
protected final Map<Thermostat, Damper> ts2damper = new HashMap<>();

/**
* Association from a thermostat to its last known signal.
*/
protected final Map<Thermostat, ThermostatSignal> ts2signal = new TreeMap<Thermostat, ThermostatSignal>();
protected final Map<Thermostat, ThermostatSignal> ts2signal = new TreeMap<>();

/**
* Last known unit signal.
Expand All @@ -60,7 +60,7 @@ public abstract class AbstractDamperController extends LogAware implements Dampe
* The only purpose is to be accessed via JMX ({@link #getDamperMap()}). Content is not used in any calculations.
* Value is refreshed in {@link #shuffle(Map)}.
*/
private final Map<Damper, Double> lastMap = new HashMap<Damper, Double>();
private final Map<Damper, Double> lastMap = new HashMap<>();

/**
* Thermostat signal consumer.
Expand All @@ -70,9 +70,9 @@ public abstract class AbstractDamperController extends LogAware implements Dampe
/**
* Mapping from thermostat name to thermostat instance - needed to support the {@link #tsListener}.
*/
private final Map<String, Thermostat> name2ts = new TreeMap<String, Thermostat>();
private final Map<String, Thermostat> name2ts = new TreeMap<>();

/**
/**
* Stays {@code true} until {@link #powerOff} is called.
*
* If this flag is {@code false} (i.e. {@link #powerOff} was called), all other methods will
Expand Down Expand Up @@ -107,14 +107,14 @@ public AbstractDamperController(Unit unit, Map<Thermostat, Damper> ts2damper) {

for (Iterator<Thermostat> i = ts2damper.keySet().iterator(); i.hasNext(); ) {

Thermostat ts = i.next();
Thermostat ts = i.next();
Damper d = ts2damper.get(ts);

put(ts, d);

ts.addConsumer(tsListener);

name2ts.put(ts.getName(), ts);
name2ts.put(ts.getName(), ts);
}
}

Expand Down Expand Up @@ -217,7 +217,7 @@ private Future<TransitionStatus> park(boolean async) {

logger.info("Turning OFF");

Map<Damper, Double> damperMap = new HashMap<Damper, Double>();
Map<Damper, Double> damperMap = new HashMap<>();

for (Iterator<Thermostat> i = ts2damper.keySet().iterator(); i.hasNext(); ) {

Expand Down Expand Up @@ -298,7 +298,7 @@ public synchronized String[] getDamperMap() {

String[] result = new String[lastMap.size()];

Map<String, Double> resultMap = new TreeMap<String, Double>();
Map<String, Double> resultMap = new TreeMap<>();

for (Iterator<Damper> i = lastMap.keySet().iterator(); i.hasNext(); ) {

Expand Down

0 comments on commit c0e1cec

Please sign in to comment.