1 17 18 21 22 package org.quartz.utils; 23 24 31 public class Pair { 32 33 40 41 private Object first; 42 43 private Object second; 44 45 52 53 60 public final Object getFirst() { 61 return first; 62 } 63 64 72 public final void setFirst(Object first) { 73 this.first = first; 74 } 75 76 83 public final Object getSecond() { 84 return second; 85 } 86 87 95 public final void setSecond(Object second) { 96 this.second = second; 97 } 98 99 108 public boolean equals(Object that) { 109 if (this == that) { 110 return true; 111 } else { 112 try { 113 Pair other = (Pair) that; 114 return (this.first.equals(other.first) && this.second 115 .equals(other.second)); 116 } catch (ClassCastException e) { 117 return false; 118 } 119 } 120 } 121 122 public int hashCode() { 123 return (17 * first.hashCode()) + second.hashCode(); 124 } 125 } 126 127 | Popular Tags |