@Test public void testEquals() { Mutation m1 = new Mutation("r1"); m1.put("cf1", "cq1", "v1"); m1.put("cf1", "cq1", new ColumnVisibility("A&B"), "v2"); m1.put("cf1", "cq1", 3, "v3"); m1.put("cf1", "cq1", new ColumnVisibility("A&B&C"), 4, "v4"); m1.putDelete("cf2", "cf3"); m1.putDelete("cf2", "cf4", 3); m1.putDelete("cf2", "cf4", new ColumnVisibility("A&B&C"), 3); Mutation m2 = new Mutation("r1"); m2.put("cf1", "cq1", "v1"); m2.put("cf1", "cq1", new ColumnVisibility("A&B"), "v2"); m2.put("cf1", "cq1", 3, "v3"); m2.put("cf1", "cq1", new ColumnVisibility("A&B&C"), 4, "v4"); m2.putDelete("cf2", "cf3"); m2.putDelete("cf2", "cf4", 3); m2.putDelete("cf2", "cf4", new ColumnVisibility("A&B&C"), 3); Mutation m3 = new Mutation("r2"); m3.put("cf1", "cq1", "v1"); m3.put("cf1", "cq1", new ColumnVisibility("A&B"), "v2"); m3.put("cf1", "cq1", 3, "v3"); m3.put("cf1", "cq1", new ColumnVisibility("A&B&C"), 4, "v4"); m3.putDelete("cf2", "cf3"); m3.putDelete("cf2", "cf4", 3); m3.putDelete("cf2", "cf4", new ColumnVisibility("A&B&C"), 3); Mutation m4 = new Mutation("r1"); m4.put("cf2", "cq1", "v1"); m4.put("cf1", "cq1", new ColumnVisibility("A&B"), "v2"); m4.put("cf1", "cq1", 3, "v3"); m4.put("cf1", "cq1", new ColumnVisibility("A&B&C"), 4, "v4"); m4.putDelete("cf2", "cf3"); m4.putDelete("cf2", "cf4", 3); m4.putDelete("cf2", "cf4", new ColumnVisibility("A&B&C"), 3); Mutation m5 = new Mutation("r1"); m5.put("cf1", "cq1", "v1"); m5.put("cf1", "cq1", new ColumnVisibility("A&B"), "v2"); m5.put("cf1", "cq1", 3, "v4"); m5.put("cf1", "cq1", new ColumnVisibility("A&B&C"), 4, "v4"); m5.putDelete("cf2", "cf3"); m5.putDelete("cf2", "cf4", 3); m5.putDelete("cf2", "cf4", new ColumnVisibility("A&B&C"), 3); assertEquals(m1, m1); assertEquals(m1, m2); assertEquals(m2, m1); assertEquals(m2.hashCode(), m1.hashCode()); assertNotEquals(0, m1.hashCode()); assertFalse(m1.equals(m3)); assertFalse(m3.equals(m1)); assertFalse(m1.equals(m4)); assertFalse(m4.equals(m1)); assertFalse(m3.equals(m4)); assertFalse(m1.equals(m5)); assertFalse(m5.equals(m1)); assertFalse(m3.equals(m5)); assertFalse(m4.equals(m5)); }
@Override public boolean equals(Object o) { if (o == this) { return true; } if (o != null && o.getClass().equals(this.getClass())) { return equalMutation((Mutation) o); } return false; }
Mutation implements Writable { @Override public boolean equals(Object o) { if (o == this) { return true; } if (o != null && o.getClass().equals(this.getClass())) { return equalMutation((Mutation) o); } return false; } }
Mutation implements Writable { @Override public boolean equals(Object o) { if (o == this) { return true; } if (o != null && o.getClass().equals(this.getClass())) { return equalMutation((Mutation) o); } return false; } Mutation(byte[] row);  Mutation(byte[] row, int initialBufferSize);  Mutation(byte[] row, int start, int length);  Mutation(byte[] row, int start, int length, int initialBufferSize);  Mutation(Text row);  Mutation(Text row, int initialBufferSize);  Mutation(CharSequence row);  Mutation(CharSequence row, int initialBufferSize);  Mutation();  Mutation(TMutation tmutation);  Mutation(Mutation m); }
Mutation implements Writable { @Override public boolean equals(Object o) { if (o == this) { return true; } if (o != null && o.getClass().equals(this.getClass())) { return equalMutation((Mutation) o); } return false; } Mutation(byte[] row);  Mutation(byte[] row, int initialBufferSize);  Mutation(byte[] row, int start, int length);  Mutation(byte[] row, int start, int length, int initialBufferSize);  Mutation(Text row);  Mutation(Text row, int initialBufferSize);  Mutation(CharSequence row);  Mutation(CharSequence row, int initialBufferSize);  Mutation();  Mutation(TMutation tmutation);  Mutation(Mutation m); byte[] getRow(); void put(Text columnFamily, Text columnQualifier, Value value); void put(Text columnFamily, Text columnQualifier, ColumnVisibility columnVisibility,
      Value value); void put(Text columnFamily, Text columnQualifier, long timestamp, Value value); void put(Text columnFamily, Text columnQualifier, ColumnVisibility columnVisibility,
      long timestamp, Value value); void putDelete(Text columnFamily, Text columnQualifier); void putDelete(Text columnFamily, Text columnQualifier,
      ColumnVisibility columnVisibility); void putDelete(Text columnFamily, Text columnQualifier, long timestamp); void putDelete(Text columnFamily, Text columnQualifier, ColumnVisibility columnVisibility,
      long timestamp); void put(CharSequence columnFamily, CharSequence columnQualifier, Value value); void put(CharSequence columnFamily, CharSequence columnQualifier,
      ColumnVisibility columnVisibility, Value value); void put(CharSequence columnFamily, CharSequence columnQualifier, long timestamp,
      Value value); void put(CharSequence columnFamily, CharSequence columnQualifier,
      ColumnVisibility columnVisibility, long timestamp, Value value); void putDelete(CharSequence columnFamily, CharSequence columnQualifier); void putDelete(CharSequence columnFamily, CharSequence columnQualifier,
      ColumnVisibility columnVisibility); void putDelete(CharSequence columnFamily, CharSequence columnQualifier, long timestamp); void putDelete(CharSequence columnFamily, CharSequence columnQualifier,
      ColumnVisibility columnVisibility, long timestamp); void put(CharSequence columnFamily, CharSequence columnQualifier, CharSequence value); void put(CharSequence columnFamily, CharSequence columnQualifier,
      ColumnVisibility columnVisibility, CharSequence value); void put(CharSequence columnFamily, CharSequence columnQualifier, long timestamp,
      CharSequence value); void put(CharSequence columnFamily, CharSequence columnQualifier,
      ColumnVisibility columnVisibility, long timestamp, CharSequence value); void put(byte[] columnFamily, byte[] columnQualifier, byte[] value); void put(byte[] columnFamily, byte[] columnQualifier, ColumnVisibility columnVisibility,
      byte[] value); void put(byte[] columnFamily, byte[] columnQualifier, long timestamp, byte[] value); void put(byte[] columnFamily, byte[] columnQualifier, ColumnVisibility columnVisibility,
      long timestamp, byte[] value); void putDelete(byte[] columnFamily, byte[] columnQualifier); void putDelete(byte[] columnFamily, byte[] columnQualifier,
      ColumnVisibility columnVisibility); void putDelete(byte[] columnFamily, byte[] columnQualifier, long timestamp); void putDelete(byte[] columnFamily, byte[] columnQualifier,
      ColumnVisibility columnVisibility, long timestamp); FamilyOptions at(); List<ColumnUpdate> getUpdates(); long numBytes(); long estimatedMemoryUsed(); int size(); void addReplicationSource(String peer); void setReplicationSources(Set<String> sources); Set<String> getReplicationSources(); @Override void readFields(DataInput in); @Override void write(DataOutput out); @Override boolean equals(Object o); @Override int hashCode(); boolean equals(Mutation m); TMutation toThrift(); }
Mutation implements Writable { @Override public boolean equals(Object o) { if (o == this) { return true; } if (o != null && o.getClass().equals(this.getClass())) { return equalMutation((Mutation) o); } return false; } Mutation(byte[] row);  Mutation(byte[] row, int initialBufferSize);  Mutation(byte[] row, int start, int length);  Mutation(byte[] row, int start, int length, int initialBufferSize);  Mutation(Text row);  Mutation(Text row, int initialBufferSize);  Mutation(CharSequence row);  Mutation(CharSequence row, int initialBufferSize);  Mutation();  Mutation(TMutation tmutation);  Mutation(Mutation m); byte[] getRow(); void put(Text columnFamily, Text columnQualifier, Value value); void put(Text columnFamily, Text columnQualifier, ColumnVisibility columnVisibility,
      Value value); void put(Text columnFamily, Text columnQualifier, long timestamp, Value value); void put(Text columnFamily, Text columnQualifier, ColumnVisibility columnVisibility,
      long timestamp, Value value); void putDelete(Text columnFamily, Text columnQualifier); void putDelete(Text columnFamily, Text columnQualifier,
      ColumnVisibility columnVisibility); void putDelete(Text columnFamily, Text columnQualifier, long timestamp); void putDelete(Text columnFamily, Text columnQualifier, ColumnVisibility columnVisibility,
      long timestamp); void put(CharSequence columnFamily, CharSequence columnQualifier, Value value); void put(CharSequence columnFamily, CharSequence columnQualifier,
      ColumnVisibility columnVisibility, Value value); void put(CharSequence columnFamily, CharSequence columnQualifier, long timestamp,
      Value value); void put(CharSequence columnFamily, CharSequence columnQualifier,
      ColumnVisibility columnVisibility, long timestamp, Value value); void putDelete(CharSequence columnFamily, CharSequence columnQualifier); void putDelete(CharSequence columnFamily, CharSequence columnQualifier,
      ColumnVisibility columnVisibility); void putDelete(CharSequence columnFamily, CharSequence columnQualifier, long timestamp); void putDelete(CharSequence columnFamily, CharSequence columnQualifier,
      ColumnVisibility columnVisibility, long timestamp); void put(CharSequence columnFamily, CharSequence columnQualifier, CharSequence value); void put(CharSequence columnFamily, CharSequence columnQualifier,
      ColumnVisibility columnVisibility, CharSequence value); void put(CharSequence columnFamily, CharSequence columnQualifier, long timestamp,
      CharSequence value); void put(CharSequence columnFamily, CharSequence columnQualifier,
      ColumnVisibility columnVisibility, long timestamp, CharSequence value); void put(byte[] columnFamily, byte[] columnQualifier, byte[] value); void put(byte[] columnFamily, byte[] columnQualifier, ColumnVisibility columnVisibility,
      byte[] value); void put(byte[] columnFamily, byte[] columnQualifier, long timestamp, byte[] value); void put(byte[] columnFamily, byte[] columnQualifier, ColumnVisibility columnVisibility,
      long timestamp, byte[] value); void putDelete(byte[] columnFamily, byte[] columnQualifier); void putDelete(byte[] columnFamily, byte[] columnQualifier,
      ColumnVisibility columnVisibility); void putDelete(byte[] columnFamily, byte[] columnQualifier, long timestamp); void putDelete(byte[] columnFamily, byte[] columnQualifier,
      ColumnVisibility columnVisibility, long timestamp); FamilyOptions at(); List<ColumnUpdate> getUpdates(); long numBytes(); long estimatedMemoryUsed(); int size(); void addReplicationSource(String peer); void setReplicationSources(Set<String> sources); Set<String> getReplicationSources(); @Override void readFields(DataInput in); @Override void write(DataOutput out); @Override boolean equals(Object o); @Override int hashCode(); boolean equals(Mutation m); TMutation toThrift();  }