com.powsybl.action.AbstractTapChangerRegulationAction Maven / Gradle / Ivy
/**
* Copyright (c) 2022, RTE (http://www.rte-france.com)
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
* SPDX-License-Identifier: MPL-2.0
*/
package com.powsybl.action;
import com.powsybl.iidm.network.ThreeSides;
import java.util.Objects;
/**
* An action modifying the regulation of a two or three windings transformer
*
* @author Etienne Lesot {@literal }
* @author Anne Tilloy {@literal }
*/
public abstract class AbstractTapChangerRegulationAction extends AbstractTapChangerAction {
private final boolean regulating;
protected AbstractTapChangerRegulationAction(String id, String transformerId, ThreeSides side, boolean regulating) {
super(id, transformerId, side);
this.regulating = regulating;
}
public boolean isRegulating() {
return regulating;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
if (!super.equals(o)) {
return false;
}
AbstractTapChangerRegulationAction that = (AbstractTapChangerRegulationAction) o;
return regulating == that.regulating;
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), regulating);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy