Update equals and hashCode methods

This commit is contained in:
filoghost 2021-05-17 18:30:46 +02:00
parent 523b866f8e
commit ae89ad25b1
3 changed files with 9 additions and 9 deletions

View File

@ -16,11 +16,11 @@ public class PlaceholderIdentifier {
}
@Override
public boolean equals(Object obj) {
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
if (!(obj instanceof PlaceholderIdentifier)) {
return false;
}
@ -29,7 +29,7 @@ public class PlaceholderIdentifier {
}
@Override
public int hashCode() {
public final int hashCode() {
return identifier.hashCode();
}

View File

@ -71,11 +71,11 @@ public class PlaceholderOccurrence {
}
@Override
public boolean equals(Object obj) {
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || this.getClass() != obj.getClass()) {
if (!(obj instanceof PlaceholderOccurrence)) {
return false;
}
@ -87,7 +87,7 @@ public class PlaceholderOccurrence {
}
@Override
public int hashCode() {
public final int hashCode() {
return hashCode;
}

View File

@ -21,11 +21,11 @@ public class PluginName {
}
@Override
public boolean equals(Object obj) {
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
if (!(obj instanceof PluginName)) {
return false;
}
@ -34,7 +34,7 @@ public class PluginName {
}
@Override
public int hashCode() {
public final int hashCode() {
return pluginName.hashCode();
}