Fix block device entries not equaling.

This commit is contained in:
Florian Nücke
2022-02-09 17:35:17 +01:00
parent 479af156c5
commit 88c044203f

View File

@@ -221,5 +221,23 @@ public abstract class AbstractBlockDeviceBusElement extends AbstractGroupingDevi
token = null;
}
}
@Override
public boolean equals(final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
final BlockEntry that = (BlockEntry) o;
return Objects.equals(dataKey, that.dataKey) && device.equals(that.device) && side == that.side;
}
@Override
public int hashCode() {
return Objects.hash(dataKey, device, side);
}
@Override
public String toString() {
return device.toString();
}
}
}