org.gitective.core.filter.commit
Class LastCommitFilter
java.lang.Object
org.eclipse.jgit.revwalk.filter.RevFilter
org.gitective.core.filter.commit.CommitFilter
org.gitective.core.filter.commit.LastCommitFilter
- All Implemented Interfaces:
- Cloneable
public class LastCommitFilter
- extends CommitFilter
Commit filter that retains the last commit seen via a call to
include(RevWalk, RevCommit). The last commit seen is available
through calling getLast() and can be cleared through calling
reset() on this filter.
| Fields inherited from class org.eclipse.jgit.revwalk.filter.RevFilter |
ALL, MERGE_BASE, NO_MERGES, NONE |
|
Method Summary |
org.eclipse.jgit.revwalk.filter.RevFilter |
clone()
Clones this filter. |
org.eclipse.jgit.revwalk.RevCommit |
getLast()
Get last commit seen |
boolean |
include(org.eclipse.jgit.revwalk.RevWalk walker,
org.eclipse.jgit.revwalk.RevCommit commit)
|
CommitFilter |
reset()
Resets the filter state. |
| Methods inherited from class org.eclipse.jgit.revwalk.filter.RevFilter |
negate, requiresCommitBody, toString |
LastCommitFilter
public LastCommitFilter()
include
public boolean include(org.eclipse.jgit.revwalk.RevWalk walker,
org.eclipse.jgit.revwalk.RevCommit commit)
throws IOException
- Specified by:
include in class org.eclipse.jgit.revwalk.filter.RevFilter
- Throws:
IOException
getLast
public org.eclipse.jgit.revwalk.RevCommit getLast()
- Get last commit seen
- Returns:
- commit or null if none seen since creation or last reset
reset
public CommitFilter reset()
- Description copied from class:
CommitFilter
- Resets the filter state.
The base implementation does nothing by default and sub-classes should
override if custom reset logic exists.
- Overrides:
reset in class CommitFilter
- Returns:
- this filter
clone
public org.eclipse.jgit.revwalk.filter.RevFilter clone()
- Description copied from class:
CommitFilter
- Clones this filter.
The default implementation throws a UnsupportedOperationException
and sub-classes should override if filter cloning is supported.
- Overrides:
clone in class CommitFilter
- See Also:
RevFilter.clone()
Copyright © 2011-2012. All Rights Reserved.