org.afcs.warts.db
Class CellDifference

java.lang.Object
  extended byorg.afcs.warts.db.CellDifference

public final class CellDifference
extends java.lang.Object

A CellDifference instance is created and stored in the array maintained in a DataComparison instance whenever a difference between cell values in the first and second dataset is detected.

LICENSE: This code is released to the public domain and may be used for any purpose whatsoever without permission or acknowledgment.

Version:
Last Modified 18 September 2003
Author:
Warren Hedley ( whedley at sdsc dot edu )

Constructor Summary
CellDifference(java.lang.Object dbOneValue, java.lang.Object dbTwoValue, boolean encodingDifference)
          Constructs a new instance with the specified information.
 
Method Summary
 boolean encodingDifference()
          Returns true if this difference represents a difference in the encoding between two otherwise identical strings.
 java.lang.Object getDbOneValue()
          Returns the value of the cell in the first dataset.
 java.lang.Object getDbTwoValue()
          Returns the value of the cell in the second dataset.
 java.lang.String toString()
          Returns a text description of the current instance that can be used for debugging purposes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CellDifference

public CellDifference(java.lang.Object dbOneValue,
                      java.lang.Object dbTwoValue,
                      boolean encodingDifference)
Constructs a new instance with the specified information.

Parameters:
dbOneValue - The value of the cell in the first dataset.
dbTwoValue - The value of the cell in the second dataset.
encodingDifference - Whether the values differ only in encoding.
Method Detail

getDbOneValue

public java.lang.Object getDbOneValue()
Returns the value of the cell in the first dataset. In the case of character data, the object returned may be a DataHighBitAnalysis instance.

Returns:
The value of the cell in the first dataset.

getDbTwoValue

public java.lang.Object getDbTwoValue()
Returns the value of the cell in the second dataset. In the case of character data, the object returned may be a DataHighBitAnalysis instance.

Returns:
The value of the cell in the second dataset.

encodingDifference

public boolean encodingDifference()
Returns true if this difference represents a difference in the encoding between two otherwise identical strings. For example, two datasets may contain the same string in a particular cell but it may be Latin-1 in one database and UTF-8 in the other.

Returns:
True if this difference represents a difference in the encoding between two otherwise identical strings.

toString

public java.lang.String toString()
Returns a text description of the current instance that can be used for debugging purposes.

Returns:
A text description of the current instance that can be used for debugging purposes.