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:
@@ -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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user