LazyTuple implements Tuple, Cloneable { @Override public boolean equals(Object obj) { if (obj instanceof Tuple) { Tuple other = (Tuple) obj; return Arrays.equals(getValues(), other.getValues()); } return false; } LazyTuple(Schema schema, byte[][] textBytes, long offset);  LazyTuple(Schema schema, byte[][] textBytes, long offset, byte[] nullBytes, SerializerDeserializer serde);  LazyTuple(LazyTuple tuple); @Override int size(); @Override boolean contains(int fieldid); @Override boolean isNull(int fieldid); @Override boolean isNotNull(int fieldid); @Override void clear(); @Override void put(int fieldId, Datum value); @Override void put(int fieldId, Datum[] values); @Override void put(int fieldId, Tuple tuple); @Override void put(Datum[] values); @Override Datum get(int fieldId); @Override void setOffset(long offset); @Override long getOffset(); @Override boolean getBool(int fieldId); @Override byte getByte(int fieldId); @Override char getChar(int fieldId); @Override byte [] getBytes(int fieldId); @Override short getInt2(int fieldId); @Override int getInt4(int fieldId); @Override long getInt8(int fieldId); @Override float getFloat4(int fieldId); @Override double getFloat8(int fieldId); @Override String getText(int fieldId); @Override ProtobufDatum getProtobufDatum(int fieldId); @Override IntervalDatum getInterval(int fieldId); @Override char[] getUnicodeChars(int fieldId); String toString(); @Override int hashCode(); @Override Datum[] getValues(); @Override Tuple clone(); @Override boolean equals(Object obj);  }
@Test public void testEquals() { int colNum = schema.size(); LazyTuple t1 = new LazyTuple(schema, new byte[colNum][], -1); LazyTuple t2 = new LazyTuple(schema, new byte[colNum][], -1); t1.put(0, DatumFactory.createInt4(1)); t1.put(1, DatumFactory.createInt4(2)); t1.put(3, DatumFactory.createInt4(2)); t2.put(0, DatumFactory.createInt4(1)); t2.put(1, DatumFactory.createInt4(2)); t2.put(3, DatumFactory.createInt4(2)); assertEquals(t1, t2); Tuple t3 = new VTuple(colNum); t3.put(0, DatumFactory.createInt4(1)); t3.put(1, DatumFactory.createInt4(2)); t3.put(3, DatumFactory.createInt4(2)); assertEquals(t1, t3); assertEquals(t2, t3); LazyTuple t4 = new LazyTuple(schema, new byte[colNum][], -1); assertNotSame(t1, t4); }