public boolean isConsistentWith ( final BaseBankCardTrackData other ) { if ( this == other ) { return true ; } if ( other == null ) { return false ; } boolean equals = true ; if ( hasAccountNumber ( ) && other . hasAccountNumber ( ) ) { if ( ! getAccountNumber ( ) . equals ( other . getAccountNumber ( ) ) ) { equals = false ; } } if ( hasExpirationDate ( ) && other . hasExpirationDate ( ) ) { if ( ! getExpirationDate ( ) . equals ( other . getExpirationDate ( ) ) ) { equals = false ; } } if ( hasServiceCode ( ) && other . hasServiceCode ( ) ) { if ( ! getServiceCode ( ) . equals ( other . getServiceCode ( ) ) ) { equals = false ; } } return equals ; }
Verifies that the available data is consistent between Track 1 and Track 2 or any other track .