org.gitective.core.filter.commit
Class ParentCountFilter

java.lang.Object
  extended by org.eclipse.jgit.revwalk.filter.RevFilter
      extended by org.gitective.core.filter.commit.CommitFilter
          extended by org.gitective.core.filter.commit.ParentCountFilter
All Implemented Interfaces:
Cloneable

public class ParentCountFilter
extends CommitFilter

Commit filter that includes commits that match the range of number of parents.


Field Summary
 
Fields inherited from class org.gitective.core.filter.commit.CommitFilter
repository
 
Fields inherited from class org.eclipse.jgit.revwalk.filter.RevFilter
ALL, MERGE_BASE, NO_MERGES, NONE
 
Constructor Summary
ParentCountFilter()
          Create a parent count filter that includes commits that have at least 2 parents.
ParentCountFilter(int min)
          Create a filter that includes commits that have a parent commit count of at least the number specified.
ParentCountFilter(int min, int max)
          Create a filter that includes commits that have a parent commit count that falls inclusively in the specified range.
 
Method Summary
 org.eclipse.jgit.revwalk.filter.RevFilter clone()
          Clones this filter.
 boolean include(org.eclipse.jgit.revwalk.RevWalk walker, org.eclipse.jgit.revwalk.RevCommit commit)
           
 
Methods inherited from class org.gitective.core.filter.commit.CommitFilter
include, reset, setRepository, setStop
 
Methods inherited from class org.eclipse.jgit.revwalk.filter.RevFilter
negate, requiresCommitBody, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParentCountFilter

public ParentCountFilter()
Create a parent count filter that includes commits that have at least 2 parents.


ParentCountFilter

public ParentCountFilter(int min)
Create a filter that includes commits that have a parent commit count of at least the number specified.

Parameters:
min - minimum number of parent commits (inclusive)

ParentCountFilter

public ParentCountFilter(int min,
                         int max)
Create a filter that includes commits that have a parent commit count that falls inclusively in the specified range.

Parameters:
min - minimum number of parent commits (inclusive)
max - maximum number of parent commits (inclusive)
Method Detail

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

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.