com.vladium.emma.report
Class Item

java.lang.Object
  extended bycom.vladium.emma.report.Item
All Implemented Interfaces:
IItem
Direct Known Subclasses:
AllItem, ClassItem, MethodItem, PackageItem, SrcFileItem

abstract class Item
extends java.lang.Object
implements IItem

Author:
Vlad Roubtsov, (C) 2003

Nested Class Summary
protected static class Item.ItemMetadata
           
 
Field Summary
protected  int[] m_aggregates
           
private  java.util.List m_children
           
protected  IItem m_parent
           
 
Fields inherited from interface com.vladium.emma.report.IItem
COVERAGE_BLOCK_COUNT, COVERAGE_BLOCK_INSTR, COVERAGE_CLASS_COUNT, COVERAGE_LINE_COUNT, COVERAGE_LINE_INSTR, COVERAGE_METHOD_COUNT, NUM_OF_AGGREGATES, PRECISION, TOTAL_BLOCK_COUNT, TOTAL_BLOCK_INSTR, TOTAL_CLASS_COUNT, TOTAL_LINE_COUNT, TOTAL_METHOD_COUNT, TOTAL_SRCFILE_COUNT
 
Constructor Summary
(package private) Item(IItem parent)
           
 
Method Summary
protected  void addChild(IItem item)
           
 int getAggregate(int type)
           
 IItemAttribute getAttribute(int attributeID, int unitsID)
           
 int getChildCount()
           
 java.util.Iterator getChildren()
           
 java.util.Iterator getChildren(ItemComparator order)
           
 IItem getParent()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.vladium.emma.report.IItem
accept, getMetadata, getName
 

Field Detail

m_parent

protected final IItem m_parent

m_aggregates

protected final int[] m_aggregates

m_children

private final java.util.List m_children
Constructor Detail

Item

Item(IItem parent)
Method Detail

getChildCount

public final int getChildCount()
Specified by:
getChildCount in interface IItem

getParent

public final IItem getParent()
Specified by:
getParent in interface IItem

getChildren

public final java.util.Iterator getChildren()
Specified by:
getChildren in interface IItem

getChildren

public final java.util.Iterator getChildren(ItemComparator order)
Specified by:
getChildren in interface IItem
Parameters:
order - [null is equivalent to no sort]
Returns:

getAttribute

public final IItemAttribute getAttribute(int attributeID,
                                         int unitsID)
Specified by:
getAttribute in interface IItem

getAggregate

public int getAggregate(int type)
Specified by:
getAggregate in interface IItem

addChild

protected void addChild(IItem item)