net.sf.bloof.metrics
Class FileGroup

java.lang.Object
  |
  +--net.sf.bloof.metrics.FileGroup
All Implemented Interfaces:
Filter

public class FileGroup
extends java.lang.Object
implements Filter

Container for a group of files. Acts as filter for a Metric This class is used as an argument for a @link{MetricParameter}

Version:
$Id: FileGroup.java,v 1.11 2003/09/06 08:35:09 pekacki Exp $
Author:
Lukasz Pekacki

Field Summary
 
Fields inherited from interface net.sf.bloof.metrics.Filter
DEFAULT_NAME_PREFIXES, DEVELOPER, FILE, TIMESPAN
 
Constructor Summary
FileGroup(FileNode[] aFileNode)
          Creates a FileGroup from an Array of FileNodes, using the pathnames of the FileNodes
FileGroup(java.lang.String[] aFullPathnameList)
          Creates a FileGroup from an Array of fully qualified pathnames If a pathname is in a subtree of another pathname the shortest common prefix is choosen and the others are deleted because of reduncance, e.g.
 
Method Summary
 java.lang.String getContent()
          Returns the content of the filter as string
 int getFilterType()
          Returns the type of the filter, must be one of Filter.FILE, Filter.DEVELOPER, Filter.TIMESPAN
 java.lang.String getName()
          Returns the name of the group
 java.util.Iterator getPathnamePrefixIterator()
          Returns an Iterator over the prefix set of the pathnames of this group
 int getSize()
          Returns the number of files in this group
 void setName(java.lang.String aName)
          Sets the name.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileGroup

public FileGroup(FileNode[] aFileNode)
Creates a FileGroup from an Array of FileNodes, using the pathnames of the FileNodes

Parameters:
aFileNode - list of FileNodes

FileGroup

public FileGroup(java.lang.String[] aFullPathnameList)
Creates a FileGroup from an Array of fully qualified pathnames If a pathname is in a subtree of another pathname the shortest common prefix is choosen and the others are deleted because of reduncance, e.g. /bloof/gui/Bla.java /bloof/gui/util/Foo.java /bloof/gui = > only /bloof/gui is choosen.

Parameters:
aFullPathnameList - list of fully qualified pathnames
Method Detail

getContent

public java.lang.String getContent()
Description copied from interface: Filter
Returns the content of the filter as string

Specified by:
getContent in interface Filter
Returns:
name of the Filter
See Also:
Object.toString( )

getFilterType

public int getFilterType()
Description copied from interface: Filter
Returns the type of the filter, must be one of Filter.FILE, Filter.DEVELOPER, Filter.TIMESPAN

Specified by:
getFilterType in interface Filter
Returns:
type of the filter, must be one of Filter.FILE, Filter.DEVELOPER, Filter.TIMESPAN
See Also:
Filter.getFilterType()

getName

public java.lang.String getName()
Returns the name of the group

Specified by:
getName in interface Filter
Returns:
mName name of the group

getPathnamePrefixIterator

public java.util.Iterator getPathnamePrefixIterator()
Returns an Iterator over the prefix set of the pathnames of this group

Returns:
Iterator

getSize

public int getSize()
Returns the number of files in this group

Returns:
number of files

setName

public void setName(java.lang.String aName)
Sets the name.

Specified by:
setName in interface Filter
Parameters:
aName - The name to set

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString( )


Copyright © 2003 bloof@Sourceforge. All Rights Reserved.