X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src2%2Ffr%2Forsay%2Flri%2Fvarna%2Fapplications%2FtemplateEditor%2FCouple.java;fp=src2%2Ffr%2Forsay%2Flri%2Fvarna%2Fapplications%2FtemplateEditor%2FCouple.java;h=2f60b012897b1709fd77160651d0ff8ff8c9cad8;hb=665d2c2f4c1310e6985b93b7c2c8a8eec2fa9086;hp=0000000000000000000000000000000000000000;hpb=0e684f72690bd6532272a39ab6c188a27559fd09;p=jalview.git diff --git a/src2/fr/orsay/lri/varna/applications/templateEditor/Couple.java b/src2/fr/orsay/lri/varna/applications/templateEditor/Couple.java new file mode 100644 index 0000000..2f60b01 --- /dev/null +++ b/src2/fr/orsay/lri/varna/applications/templateEditor/Couple.java @@ -0,0 +1,35 @@ +package fr.orsay.lri.varna.applications.templateEditor; + + +public class Couple { + public T first; + public U second; + private static final int HASH_PRIME = 1000003; + + + public Couple(T a, U b) + { + first = a; + second = b; + } + + public boolean equals( Object c) + { + if (!(c instanceof Couple)) + { + return false; + } + Couple cc = (Couple) c; + return (cc.first.equals(first) && (cc.second.equals(second))); + } + + public int hashCode() + { + return HASH_PRIME*first.hashCode()+second.hashCode(); + } + + public String toString() + { + return "("+first+","+second+")"; + } +}