Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-26 00:00:28 +01:00
Implement hashCode for version
Dieser Commit ist enthalten in:
Ursprung
744fa25349
Commit
5364d89ca8
@ -2,6 +2,8 @@ package us.myles.ViaVersion.update;
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@ -85,6 +87,13 @@ public class Version implements Comparable<Version> {
|
||||
return that instanceof Version && equals(this, (Version) that);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = Objects.hash(tag);
|
||||
result = 31 * result + Arrays.hashCode(parts);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the tag, eg. -ALPHA
|
||||
*
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren