Interface Diff
- All Superinterfaces:
PropertySupport
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the path for the changed file.getHunks()
Retrieves a list containing zero or morehunks
describing the changed lines within the file.Retrieves the path for the file before it was changed.boolean
isBinary()
Retrieves a flag indicating whether the changed file is binary.boolean
Retrieves a flag indicating whether the list ofhunks
had to be truncated.Methods inherited from interface com.atlassian.bitbucket.property.PropertySupport
getProperties
-
Method Details
-
getDestination
Retrieves the path for the changed file.This value has three categories:
- The same as the
source
, indicating the file was modified in-place - Different from the
getSource()
source}, indicating the file was copied, moved or renamed, potentially with or without content changes null
, indicating the file was deleted
Note: While the destination and the
source
may each benull
, they will never both benull
.- Returns:
- the path to the file after the change
- The same as the
-
getHunks
Retrieves a list containing zero or morehunks
describing the changed lines within the file. The list may be empty, but nevernull
.- Returns:
- zero or more hunks describing changed lines
-
getSource
Retrieves the path for the file before it was changed.This value has three categories:
- The same as the
destination
, indicating the file was modified in-place - Different from the
destination
, indicating the file was copied, moved or renamed, potentially with or without content changes null
, indicating the file is new
Note: While the
destination
and the source may each benull
, they will never both benull
.- Returns:
- the path to the file before the change
- The same as the
-
isBinary
boolean isBinary()Retrieves a flag indicating whether the changed file is binary. Binary files cannot be diffed.Note: When this flag is
true
, thehunks
list will always be empty.- Returns:
true
if the changed file is binary, indicating there is no diff; otherwise,false
-
isTruncated
boolean isTruncated()Retrieves a flag indicating whether the list ofhunks
had to be truncated.To manage resource consumption, the system may impose a limit on the size of diffs it is willing to render. This flag is set to inform callers when such limits are exceeded. Diffs may be truncated at many different levels. Additional truncation flags exist for
hunks
,segments
andlines
, allowing callers to know exactly how the diff was truncated.Note: If this flag is
true
but nohunks
aretruncated
, it means at least one hunk was entirely omitted.- Returns:
true
if the diff was truncated, removing one or more
-