X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.runtime%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fruntime%2Ffunction%2FUnsaturatedFunction8.java;fp=bundles%2Forg.simantics.scl.runtime%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fruntime%2Ffunction%2FUnsaturatedFunction8.java;h=6a030e9c0d3183aa8db08f2cacec7c28c907f4bf;hp=4686cbc2b5e818e0628357cf1555b32c3a811174;hb=6c0602e24f372963350b594fed9c7828a5540641;hpb=1a1bd2744cf9615f1cc7364094c5d9bdbdd4c97f diff --git a/bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/function/UnsaturatedFunction8.java b/bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/function/UnsaturatedFunction8.java index 4686cbc2b..6a030e9c0 100644 --- a/bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/function/UnsaturatedFunction8.java +++ b/bundles/org.simantics.scl.runtime/src/org/simantics/scl/runtime/function/UnsaturatedFunction8.java @@ -83,6 +83,7 @@ public class UnsaturatedFunction8 implements Function { nps[i + 8] = ps[i]; return f.applyArray(nps); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -98,4 +99,73 @@ public class UnsaturatedFunction8 implements Function { sb.append(")"); return sb.toString(); } + + @Override + public int hashCode() { + int result = f.hashCode(); + result = 31 * result + (p0 == null ? 0 : p0.hashCode()); + result = 31 * result + (p1 == null ? 0 : p1.hashCode()); + result = 31 * result + (p2 == null ? 0 : p2.hashCode()); + result = 31 * result + (p3 == null ? 0 : p3.hashCode()); + result = 31 * result + (p4 == null ? 0 : p4.hashCode()); + result = 31 * result + (p5 == null ? 0 : p5.hashCode()); + result = 31 * result + (p6 == null ? 0 : p6.hashCode()); + result = 31 * result + (p7 == null ? 0 : p7.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + UnsaturatedFunction8 other = (UnsaturatedFunction8) obj; + if(!f.equals(other.f)) + return false; + if(p0 == null) { + if (other.p0 != null) + return false; + } else if (!p0.equals(other.p0)) + return false; + if(p1 == null) { + if (other.p1 != null) + return false; + } else if (!p1.equals(other.p1)) + return false; + if(p2 == null) { + if (other.p2 != null) + return false; + } else if (!p2.equals(other.p2)) + return false; + if(p3 == null) { + if (other.p3 != null) + return false; + } else if (!p3.equals(other.p3)) + return false; + if(p4 == null) { + if (other.p4 != null) + return false; + } else if (!p4.equals(other.p4)) + return false; + if(p5 == null) { + if (other.p5 != null) + return false; + } else if (!p5.equals(other.p5)) + return false; + if(p6 == null) { + if (other.p6 != null) + return false; + } else if (!p6.equals(other.p6)) + return false; + if(p7 == null) { + if (other.p7 != null) + return false; + } else if (!p7.equals(other.p7)) + return false; + return true; + } + }