Ejemplo n.º 1
0
 public boolean equals(Object other) {
   if (!(other instanceof Text)) {
     return false;
   }
   Text that = (Text) other;
   if (!this.getKey().equals(that.getKey())) {
     return false; // key does not match
   } else if (!this.getDefault(false).equals(that.getDefault(false))) {
     return true; // default text does not match
   } else if (this.hasPackage() != that.hasPackage()) {
     return false; // package does not match
   } else if (this.hasPackage() && !this.getPackage().equals(that.getPackage())) {
     return false; // package does not match
   } else {
     return true;
   }
 }