Example #1
0
 public boolean equals(final Object o) {
   if (o == this) {
     return true;
   }
   if (!(o instanceof BSONObject)) {
     return false;
   }
   final BSONObject other = (BSONObject) o;
   return ((HashMap<String, V>) this).keySet().equals(other.keySet())
       && Arrays.equals(
           canonicalizeBSONObject(this).encode(), canonicalizeBSONObject(other).encode());
 }
Example #2
0
 public int hashCode() {
   return Arrays.hashCode(canonicalizeBSONObject(this).encode());
 }