9
0
mirror of https://github.com/WiIIiam278/HuskSync.git synced 2025-12-19 14:59:21 +00:00

feat: implement hashCode in Identifier classes

This commit is contained in:
William278
2025-03-06 14:38:01 +00:00
parent b108d38598
commit 2a59a0b3f5

View File

@@ -234,6 +234,11 @@ public class Identifier {
return obj instanceof Identifier other ? toString().equals(other.toString()) : super.equals(obj); return obj instanceof Identifier other ? toString().equals(other.toString()) : super.equals(obj);
} }
@Override
public int hashCode() {
return key.toString().hashCode();
}
// Get the config entry for the identifier // Get the config entry for the identifier
@NotNull @NotNull
private Map.Entry<String, Boolean> getConfigEntry() { private Map.Entry<String, Boolean> getConfigEntry() {
@@ -313,6 +318,11 @@ public class Identifier {
} }
return false; return false;
} }
@Override
public int hashCode() {
return key.toString().hashCode();
}
} }
} }