proper equal and hashcode for ShaderNodesVariables.
This commit is contained in:
parent
4faf6cf36c
commit
29dfff223c
@ -150,7 +150,12 @@ public class ShaderNodeVariable implements Savable, Cloneable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int hash = 5;
|
int hash = 7;
|
||||||
|
hash = 29 * hash + (name != null?name.hashCode():0);
|
||||||
|
hash = 29 * hash + (type != null?type.hashCode():0);
|
||||||
|
hash = 29 * hash + (nameSpace != null?nameSpace.hashCode():0);
|
||||||
|
hash = 29 * hash + (condition != null?condition.hashCode():0);
|
||||||
|
hash = 29 * hash + (multiplicity != null?multiplicity.hashCode():0);
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -172,6 +177,12 @@ public class ShaderNodeVariable implements Savable, Cloneable {
|
|||||||
if ((this.nameSpace == null) ? (other.nameSpace != null) : !this.nameSpace.equals(other.nameSpace)) {
|
if ((this.nameSpace == null) ? (other.nameSpace != null) : !this.nameSpace.equals(other.nameSpace)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if ((this.condition == null) ? (other.condition != null) : !this.condition.equals(other.condition)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if ((this.multiplicity == null) ? (other.multiplicity != null) : !this.multiplicity.equals(other.multiplicity)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user