java.lang.Object
com.betterdiff.core.pairing.PairedChunk
public class PairedChunk
extends java.lang.Object
Chunk with identification. Identification should be based on the chunk content,
but it's left to the implementation detail.
It add a new attribute to already existing chunk:
- id - It's a unique number (hash) for the original chunk. More different chunks
can have the same number, then their content is considered equal (do not confuse
equal content with equal objects).
Example:
Chunk 1: This is a long sentence.
Chunk 2: This is a dog.
Chunk 3: This sentence is long.
Depending on the pairing implementation, content of Chunk 1 and Chunk 3 can be considered
equal for further alignment or identification phase, thus getting the same id.
- Author:
- troomar
-
Constructor Summary
Constructors Constructor Description PairedChunk(PairedChunk pairedChunk)
Constructor for clone purposes.PairedChunk(Chunk originalChunk, int id)
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object obj)
int
getId()
java.lang.String
getIdentification()
Chunk
getOriginalChunk()
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
PairedChunk
-
PairedChunk
Constructor for clone purposes.- Parameters:
pairedChunk
- Original chunk to be cloned from
-
-
Method Details
-
getId
public int getId() -
getOriginalChunk
-
getIdentification
public java.lang.String getIdentification() -
equals
public boolean equals(java.lang.Object obj)- Overrides:
equals
in classjava.lang.Object
-