public interface DeltaNodeDetail
Comparison.Method
used to perform the comparison.
Comparison.Method.AS_TEXT
- the numbers of added,
deleted and changed blocks of text.
The results of a folder comparison are DeltaNode
-specific and often
unique. For instance, when comparing by Comparison.Method.SIZE
,
Comparison.Method.DATE_MODIFIED
and
Comparison.Method.ATTRIBUTES
the resources of a given
DeltaNode
can differ by size only; in that case the
getMethod()
will return
Comparison.Method#SIZE
. The resources of another DeltaNode
can differ by size and date in which case getMethod()
will return [
Comparison.Method#SIZE
, Comparison.Method#DATE_MODIFIED
].
Modifier and Type | Method and Description |
---|---|
int |
count(Delta.Kind[] kinds)
When the comparing text files using
Comparison.Method.AS_TEXT
this method counts the numbers of specified Delta.Kind -s and
returns their sum. |
Comparison.Method[] |
getMethod()
Returns an array containing one or more
Comparison.Method -s that
the comparison algorithm detected differences for. |
long |
getTimeDelta()
Returns the time delta when comparing using
Comparison.Method.DATE_MODIFIED . |
int count(Delta.Kind[] kinds)
Comparison.Method.AS_TEXT
this method counts the numbers of specified Delta.Kind
-s and
returns their sum. For example, if two files have 3 blocks of added text
and 1 block of deleted text, calling count(Delta.Kind.ADDED)
will
return 3 and calling count(Delta.Kind.DELETED)
will return 1.
Calling count([Delta.Kind.ADDED, Delta.Kind.DELETED])
will return
4.
When comparing binary files, the count()
always returns 1.
kinds
- an array of Delta.Kind
-s. Cannot be null
or
empty.java.lang.NullPointerException
- if kinds
is null
.java.lang.IllegalArgumentException
- if kinds
is empty.Comparison.Method[] getMethod()
Comparison.Method
-s that
the comparison algorithm detected differences for.
For example, when comparing by Comparison.Method#SIZE
,
Comparison.Method#DATE_MODIFIED
and
Comparison.Method#ATTRIBUTES
only timestamp differences were
found, getMethod()
would return
Comparison.Method#DATE_MODIFIED
DiffMethod
-s that
produced differences.long getTimeDelta()
Comparison.Method.DATE_MODIFIED
. This field is not used when
comparing using other Comparison.Method
-s.Comparison.Method#DATE_MODIFIED
; 0 otherwise.