Esempio n. 1
0
 /**
  * equals.
  *
  * @param o compared object
  * @return true when given object is the same as this. otherwise return false
  */
 @Override
 public boolean equals(final Object o) {
   if (o instanceof SeedClusterId) {
     SeedClusterId that = (SeedClusterId) o;
     return (hashSeed == that.getSeed()) && (clusterId == that.getClusterId());
   }
   return false;
 }
Esempio n. 2
0
 /**
  * Compare this into given one.
  *
  * @param that another SeedClusterId object
  * @return -
  */
 @Override
 public int compareTo(final SeedClusterId that) {
   int seedResult = compareLongs(this.hashSeed, that.getSeed());
   return seedResult == 0 ? compareLongs(clusterId, that.getClusterId()) : seedResult;
 }