Back to project page DKO.
The source code is released under:
GNU Lesser General Public License
If you think the Android project DKO listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.kered.dko; // w ww . j a v a 2s . com class Tuple { static class Tuple2<S1, S2> { public final S1 a; public final S2 b; public Tuple2(final S1 a, final S2 b) { this.a = a; this.b = b; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((a == null) ? 0 : a.hashCode()); result = prime * result + ((b == null) ? 0 : b.hashCode()); return result; } @Override public String toString() { return "Tuple [a=" + a + ", b=" + b + "]"; } @Override public boolean equals(final Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; @SuppressWarnings("rawtypes") final Tuple2 other = (Tuple2) obj; if (a == null) { if (other.a != null) return false; } else if (!a.equals(other.a)) return false; if (b == null) { if (other.b != null) return false; } else if (!b.equals(other.b)) return false; return true; } } static class Tuple3<S1, S2, S3> { public final S1 a; public final S2 b; public final S3 c; public Tuple3(final S1 a, final S2 b, final S3 c) { this.a = a; this.b = b; this.c = c; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((a == null) ? 0 : a.hashCode()); result = prime * result + ((b == null) ? 0 : b.hashCode()); result = prime * result + ((c == null) ? 0 : c.hashCode()); return result; } @Override public boolean equals(final Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; @SuppressWarnings("rawtypes") final Tuple3 other = (Tuple3) obj; if (a == null) { if (other.a != null) return false; } else if (!a.equals(other.a)) return false; if (b == null) { if (other.b != null) return false; } else if (!b.equals(other.b)) return false; if (c == null) { if (other.c != null) return false; } else if (!c.equals(other.c)) return false; return true; } @Override public String toString() { return "Tuple [a=" + a + ", b=" + b + ", c=" + c + "]"; } } }