org.gitective.core.filter.tree
Class TypeCountFilter

java.lang.Object
  extended by org.eclipse.jgit.treewalk.filter.TreeFilter
      extended by org.gitective.core.filter.tree.BaseTreeFilter
          extended by org.gitective.core.filter.tree.TypeCountFilter

public class TypeCountFilter
extends BaseTreeFilter

Tree filter that counts entries visited of a configured type


Field Summary
 
Fields inherited from class org.gitective.core.filter.tree.BaseTreeFilter
repository
 
Fields inherited from class org.eclipse.jgit.treewalk.filter.TreeFilter
ALL, ANY_DIFF
 
Constructor Summary
TypeCountFilter(int type)
          Create filter that counts the configured type
 
Method Summary
 org.eclipse.jgit.treewalk.filter.TreeFilter clone()
          Clones the tree filter.
static TypeCountFilter file()
          Create filter that counts files
 long getCount()
          Get entry type count
 int getType()
          Get type being counted
 boolean include(org.eclipse.jgit.treewalk.TreeWalk walker)
           
 BaseTreeFilter reset()
          Reset the filter.
static TypeCountFilter submodule()
          Count filter that counts submodules
static TypeCountFilter symlink()
          Create filter that counts symbolic links
static TypeCountFilter tree()
          Create filter that counts trees
 
Methods inherited from class org.gitective.core.filter.tree.BaseTreeFilter
include, include, setRepository, setStop, shouldBeRecursive
 
Methods inherited from class org.eclipse.jgit.treewalk.filter.TreeFilter
negate, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypeCountFilter

public TypeCountFilter(int type)
Create filter that counts the configured type

Parameters:
type -
Method Detail

submodule

public static TypeCountFilter submodule()
Count filter that counts submodules

Returns:
submodule type filter

file

public static TypeCountFilter file()
Create filter that counts files

Returns:
file type filter

symlink

public static TypeCountFilter symlink()
Create filter that counts symbolic links

Returns:
symbolic link type filter

tree

public static TypeCountFilter tree()
Create filter that counts trees

Returns:
tree type filter

getCount

public long getCount()
Get entry type count

Returns:
count

getType

public int getType()
Get type being counted

Returns:
type

reset

public BaseTreeFilter reset()
Description copied from class: BaseTreeFilter
Reset the filter. Sub-classes may override.

Overrides:
reset in class BaseTreeFilter
Returns:
this tree filter

include

public boolean include(org.eclipse.jgit.treewalk.TreeWalk walker)
                throws IOException
Specified by:
include in class org.eclipse.jgit.treewalk.filter.TreeFilter
Throws:
IOException

clone

public org.eclipse.jgit.treewalk.filter.TreeFilter clone()
Description copied from class: BaseTreeFilter
Clones the tree filter.

The default implementation throws a UnsupportedOperationException and sub-classes should override if filter cloning is supported.

Overrides:
clone in class BaseTreeFilter
See Also:
TreeFilter.clone()


Copyright © 2011-2012. All Rights Reserved.