File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
src/main/java/edu/ie3/datamodel/models/voltagelevels Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 77
88import edu .ie3 .datamodel .exceptions .VoltageLevelException ;
99import edu .ie3 .util .interval .RightOpenInterval ;
10- import java .util .Collections ;
11- import java .util .Set ;
12- import java .util .SortedSet ;
13- import java .util .TreeSet ;
10+ import java .util .*;
1411import javax .measure .quantity .ElectricPotential ;
1512import tech .units .indriya .ComparableQuantity ;
1613
@@ -88,6 +85,11 @@ public boolean equals(Object o) {
8885 return this .voltageRange .equals (that .voltageRange );
8986 }
9087
88+ @ Override
89+ public int hashCode () {
90+ return Objects .hash (super .hashCode (), synonymousIds , voltageRange );
91+ }
92+
9193 @ Override
9294 public String toString () {
9395 return "CommonVoltageLevel{"
Original file line number Diff line number Diff line change 66package edu .ie3 .datamodel .models .voltagelevels ;
77
88import java .io .Serializable ;
9+ import java .util .Objects ;
910import javax .measure .quantity .ElectricPotential ;
1011import tech .units .indriya .ComparableQuantity ;
1112
@@ -56,6 +57,11 @@ public boolean equals(Object o) {
5657 return this .nominalVoltage .isEquivalentTo (that .nominalVoltage );
5758 }
5859
60+ @ Override
61+ public int hashCode () {
62+ return Objects .hash (id , nominalVoltage );
63+ }
64+
5965 @ Override
6066 public String toString () {
6167 return "VoltageLevel{" + "id='" + id + '\'' + ", nominalVoltage=" + nominalVoltage + '}' ;
You can’t perform that action at this time.
0 commit comments