Package com.jcabi.github
Class CommitsComparison.Smart
- java.lang.Object
-
- com.jcabi.github.CommitsComparison.Smart
-
- All Implemented Interfaces:
CommitsComparison
,JsonReadable
- Enclosing interface:
- CommitsComparison
@Immutable @Loggable(1) public static final class CommitsComparison.Smart extends Object implements CommitsComparison
Smart commits comparison with extra features.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.jcabi.github.CommitsComparison
CommitsComparison.Smart
-
-
Constructor Summary
Constructors Constructor Description Smart(CommitsComparison cmprsn)
Public ctor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterable<RepoCommit>
commits()
Get commits.Iterable<FileChange>
files()
Iterate over the file changes between the two commits being compared.javax.json.JsonObject
json()
Describe it in a JSON object.Repo
repo()
Get a parent repository of commits.
-
-
-
Constructor Detail
-
Smart
public Smart(CommitsComparison cmprsn)
Public ctor.- Parameters:
cmprsn
- Commits comparison
-
-
Method Detail
-
commits
public Iterable<RepoCommit> commits() throws IOException
Get commits.- Returns:
- Commits
- Throws:
IOException
- If there is any I/O problem
-
files
public Iterable<FileChange> files() throws IOException
Description copied from interface:CommitsComparison
Iterate over the file changes between the two commits being compared.- Specified by:
files
in interfaceCommitsComparison
- Returns:
- Iterable of file changes
- Throws:
IOException
- If there is any I/O problem
-
repo
public Repo repo()
Description copied from interface:CommitsComparison
Get a parent repository of commits.- Specified by:
repo
in interfaceCommitsComparison
- Returns:
- Repository
-
json
public javax.json.JsonObject json() throws IOException
Description copied from interface:JsonReadable
Describe it in a JSON object.- Specified by:
json
in interfaceJsonReadable
- Returns:
- JSON object
- Throws:
IOException
- If there is any I/O problem
-
-