org.opennms.netmgt.dao.support
Class BottomNAttributeStatisticVisitor

java.lang.Object
  extended by org.opennms.netmgt.dao.support.BottomNAttributeStatisticVisitor
All Implemented Interfaces:
AttributeStatisticVisitor, AttributeStatisticVisitorWithResults, org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
TopNAttributeStatisticVisitor

public class BottomNAttributeStatisticVisitor
extends Object
implements AttributeStatisticVisitorWithResults, org.springframework.beans.factory.InitializingBean

Author:
DJ Gregor

Nested Class Summary
 class BottomNAttributeStatisticVisitor.AttributeStatisticComparator
           
 class BottomNAttributeStatisticVisitor.DoubleComparator
           
 
Field Summary
protected  Comparator<Double> m_comparator
           
 
Constructor Summary
BottomNAttributeStatisticVisitor()
           
 
Method Summary
 void afterPropertiesSet()
           
 Comparator<Double> getComparator()
           
 Integer getCount()
           
 SortedSet<AttributeStatistic> getResults()
           
 void setComparator(Comparator<Double> comparator)
           
 void setCount(Integer count)
           
 void visit(OnmsAttribute attribute, double statistic)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_comparator

protected Comparator<Double> m_comparator
Constructor Detail

BottomNAttributeStatisticVisitor

public BottomNAttributeStatisticVisitor()
Method Detail

visit

public void visit(OnmsAttribute attribute,
                  double statistic)
Specified by:
visit in interface AttributeStatisticVisitor
See Also:
AttributeStatisticVisitor.visit(org.opennms.netmgt.model.OnmsAttribute, double)

afterPropertiesSet

public void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface AttributeStatisticVisitorWithResults
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
See Also:
InitializingBean.afterPropertiesSet()

getCount

public Integer getCount()
Specified by:
getCount in interface AttributeStatisticVisitorWithResults

setCount

public void setCount(Integer count)
Specified by:
setCount in interface AttributeStatisticVisitorWithResults

getResults

public SortedSet<AttributeStatistic> getResults()
Specified by:
getResults in interface AttributeStatisticVisitorWithResults
Returns:
top attribute statistics (up to getCount() number)

getComparator

public Comparator<Double> getComparator()

setComparator

public void setComparator(Comparator<Double> comparator)


Copyright © 2009. All Rights Reserved.