public abstract class

AbstractDiffRequest

extends Object
java.lang.Object
   ↳ com.atlassian.stash.content.AbstractDiffRequest
Known Direct Subclasses

Summary

Nested Classes
class AbstractDiffRequest.AbstractBuilder<B extends AbstractBuilder<B, R>, R>  
Protected Constructors
AbstractDiffRequest(AbstractBuilder builder)
Public Methods
int getContextLines()
Retrieves the numbers of context lines to show around added and removed lines.
@Nullable DiffContentFilter getFilter()
@Nonnull Set<String> getPaths()
@Nonnull DiffWhitespace getWhitespace()
boolean hasContextLines()
Retrieves a flag indicating whether an explicit number of context lines has been requested.
[Expand]
Inherited Methods
From class java.lang.Object

Protected Constructors

protected AbstractDiffRequest (AbstractBuilder builder)

Public Methods

public int getContextLines ()

Retrieves the numbers of context lines to show around added and removed lines. If the value is 0 context will be omitted and only added and removed lines will be shown. For positive values, that number of lines will be shown. For negative values, the system-configured default number will be shown.

Returns
  • the number of context lines that should be included around added and removed lines in the diff

@Nullable public DiffContentFilter getFilter ()

Returns
  • an optional filter for this diff to filter out lines (and their surrounding file/hunk/segment)

@Nonnull public Set<String> getPaths ()

Returns
  • specific paths to diff, which may be empty to stream the diff for every modified path

@Nonnull public DiffWhitespace getWhitespace ()

Returns
  • the whitespace settings used in the diff

public boolean hasContextLines ()

Retrieves a flag indicating whether an explicit number of context lines has been requested. When this method returns true, getContextLines() will return a value greater than or equal to 0, When it returns false, getContextLines() will return #DEFAULT_CONTEXT_LINES.

Returns
  • true if a non-#DEFAULT_CONTEXT_LINES default number of context lines has been requested; otherwise, false to use the default number of lines