public void setActualDirection(int actualDirection) { if (!safeEquals(myActualDirection, actualDirection)) { myActualDirection = actualDirection; myListener.actualDirectionChanged(); myThresholdHelper.directionOnThresholdMayBeChanged(); } }
public void setIgnoreDemandedDirection(boolean ignore) { if (myIgnoreDemandedDirection != ignore) { myIgnoreDemandedDirection = ignore; myListener.demandedDirectionChanged(); myThresholdHelper.directionOnThresholdMayBeChanged(); } }
public void setDemandedDirection(int demandedDirection) { if (!safeEquals(myDemandedDirection, demandedDirection)) { myDemandedDirection = demandedDirection; myListener.demandedDirectionChanged(); myThresholdHelper.directionOnThresholdMayBeChanged(); } }
public void setDirectionThreshold(int directionThreshold) { if (!safeEquals(myDirectionThreshold, directionThreshold)) { myDirectionThreshold = directionThreshold; // do not call listener directly // myListener.directionThresholdChanged(); myThresholdHelper.directionOnThresholdMayBeChanged(); } }