|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cyvis.core.metrics.PackageMetric
public class PackageMetric
Holds a particular packages's metrics.
Field Summary | |
---|---|
String |
name
|
static cyvis.core.metrics.PackageMetric._ReverseSizeComparator |
REVERSE_SIZE_COMPARATOR
A comparator for PackageMetric objects, ordering by number of classes, in reverse, then by name. |
Constructor Summary | |
---|---|
PackageMetric(String n)
Constructs a new empty PackageMetric object |
|
PackageMetric(String packageName,
Collection<ClassMetric> classes)
Constructs a PackageMetric instance. |
Method Summary | |
---|---|
void |
add(ClassMetric classmetric)
Adds a ClassMetric object to the package |
boolean |
contains(String name)
returns true if the class is in this else returns false |
ClassMetric |
getClassMetric(String name)
Returns a specified ClassMetric object, or returns null if the specified class is not in the package |
Iterator<ClassMetric> |
iterator()
Returns an iterator across the classes in this package. |
int |
maxClassSize()
Returns the size of the largest class in this package. |
int |
size()
Returns the number of classes in this package. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final cyvis.core.metrics.PackageMetric._ReverseSizeComparator REVERSE_SIZE_COMPARATOR
public final transient String name
Constructor Detail |
---|
public PackageMetric(String packageName, Collection<ClassMetric> classes)
packageName
- the name of the packageclasses
- the classes belonging to this packagepublic PackageMetric(String n)
Method Detail |
---|
public void add(ClassMetric classmetric)
public ClassMetric getClassMetric(String name)
public boolean contains(String name)
public Iterator<ClassMetric> iterator()
iterator
in interface Iterable<ClassMetric>
public int maxClassSize()
public int size()
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |