@Test public void testEquals() { final CsvContext context = new CsvContext(1, 2, 3); final CsvContext contextWithSource = new CsvContext(1, 2, 3); contextWithSource.setRowSource(Arrays.asList(new Object[] { "one", "two", "three" })); assertTrue(context.equals(context)); assertFalse(context.equals(null)); assertFalse(context.equals("A String, not a CsvContext!")); assertFalse(context.equals(new CsvContext(1, 2, 4))); assertFalse(context.equals(new CsvContext(1, 4, 3))); assertFalse(context.equals(new CsvContext(4, 2, 3))); assertFalse(context.equals(contextWithSource)); final CsvContext contextWithDifferentSource = new CsvContext(1, 2, 3); contextWithDifferentSource.setRowSource(Arrays.asList(new Object[] { "four", "five", "six" })); assertFalse(contextWithSource.equals(contextWithDifferentSource)); assertTrue(context.equals(new CsvContext(1, 2, 3))); final CsvContext same = new CsvContext(1, 2, 3); same.setRowSource(Arrays.asList(new Object[] { "one", "two", "three" })); assertTrue(contextWithSource.equals(same)); }
@Override public boolean equals(Object obj) { if( this == obj ) { return true; } if( obj == null ) { return false; } if( getClass() != obj.getClass() ) { return false; } final CsvContext other = (CsvContext) obj; if( columnNumber != other.columnNumber ) { return false; } if( rowNumber != other.rowNumber ) { return false; } if( lineNumber != other.lineNumber ) { return false; } if( rowSource == null ) { if( other.rowSource != null ) { return false; } } else if( !rowSource.equals(other.rowSource) ) { return false; } return true; }
CsvContext implements Serializable { @Override public boolean equals(Object obj) { if( this == obj ) { return true; } if( obj == null ) { return false; } if( getClass() != obj.getClass() ) { return false; } final CsvContext other = (CsvContext) obj; if( columnNumber != other.columnNumber ) { return false; } if( rowNumber != other.rowNumber ) { return false; } if( lineNumber != other.lineNumber ) { return false; } if( rowSource == null ) { if( other.rowSource != null ) { return false; } } else if( !rowSource.equals(other.rowSource) ) { return false; } return true; } }
CsvContext implements Serializable { @Override public boolean equals(Object obj) { if( this == obj ) { return true; } if( obj == null ) { return false; } if( getClass() != obj.getClass() ) { return false; } final CsvContext other = (CsvContext) obj; if( columnNumber != other.columnNumber ) { return false; } if( rowNumber != other.rowNumber ) { return false; } if( lineNumber != other.lineNumber ) { return false; } if( rowSource == null ) { if( other.rowSource != null ) { return false; } } else if( !rowSource.equals(other.rowSource) ) { return false; } return true; } CsvContext(final int lineNumber, final int rowNumber, final int columnNumber);  CsvContext(final CsvContext c); }
CsvContext implements Serializable { @Override public boolean equals(Object obj) { if( this == obj ) { return true; } if( obj == null ) { return false; } if( getClass() != obj.getClass() ) { return false; } final CsvContext other = (CsvContext) obj; if( columnNumber != other.columnNumber ) { return false; } if( rowNumber != other.rowNumber ) { return false; } if( lineNumber != other.lineNumber ) { return false; } if( rowSource == null ) { if( other.rowSource != null ) { return false; } } else if( !rowSource.equals(other.rowSource) ) { return false; } return true; } CsvContext(final int lineNumber, final int rowNumber, final int columnNumber);  CsvContext(final CsvContext c); int getLineNumber(); void setLineNumber(int lineNumber); int getRowNumber(); void setRowNumber(int rowNumber); int getColumnNumber(); void setColumnNumber(int columnNumber); List<Object> getRowSource(); void setRowSource(List<Object> rowSource); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); }
CsvContext implements Serializable { @Override public boolean equals(Object obj) { if( this == obj ) { return true; } if( obj == null ) { return false; } if( getClass() != obj.getClass() ) { return false; } final CsvContext other = (CsvContext) obj; if( columnNumber != other.columnNumber ) { return false; } if( rowNumber != other.rowNumber ) { return false; } if( lineNumber != other.lineNumber ) { return false; } if( rowSource == null ) { if( other.rowSource != null ) { return false; } } else if( !rowSource.equals(other.rowSource) ) { return false; } return true; } CsvContext(final int lineNumber, final int rowNumber, final int columnNumber);  CsvContext(final CsvContext c); int getLineNumber(); void setLineNumber(int lineNumber); int getRowNumber(); void setRowNumber(int rowNumber); int getColumnNumber(); void setColumnNumber(int columnNumber); List<Object> getRowSource(); void setRowSource(List<Object> rowSource); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }