Package org.opennms.netmgt.dao.support
Class BottomNAttributeStatisticVisitor
- java.lang.Object
-
- 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
BottomNAttributeStatisticVisitor class.
- Version:
- $Id: $
- Author:
- DJ Gregor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classBottomNAttributeStatisticVisitor.AttributeStatisticComparatorstatic classBottomNAttributeStatisticVisitor.DoubleComparator
-
Field Summary
Fields Modifier and Type Field Description protected Comparator<Double>m_comparator
-
Constructor Summary
Constructors Constructor Description BottomNAttributeStatisticVisitor()Constructor for BottomNAttributeStatisticVisitor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()afterPropertiesSetComparator<Double>getComparator()getComparatorIntegergetCount()getCountSortedSet<AttributeStatistic>getResults()getResultsvoidsetComparator(Comparator<Double> comparator)setComparatorvoidsetCount(Integer count)setCountvoidvisit(OnmsAttribute attribute, double statistic)visit
-
-
-
Field Detail
-
m_comparator
protected Comparator<Double> m_comparator
-
-
Method Detail
-
visit
public void visit(OnmsAttribute attribute, double statistic)
visit
- Specified by:
visitin interfaceAttributeStatisticVisitor- Parameters:
attribute- aOnmsAttributeobject.statistic- a double.
-
afterPropertiesSet
public void afterPropertiesSet()
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceAttributeStatisticVisitorWithResults- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- See Also:
InitializingBean.afterPropertiesSet()
-
getCount
public Integer getCount()
getCount
- Specified by:
getCountin interfaceAttributeStatisticVisitorWithResults- Returns:
- a
Integerobject.
-
setCount
public void setCount(Integer count)
setCount
- Specified by:
setCountin interfaceAttributeStatisticVisitorWithResults- Parameters:
count- aIntegerobject.
-
getResults
public SortedSet<AttributeStatistic> getResults()
getResults
- Specified by:
getResultsin interfaceAttributeStatisticVisitorWithResults- Returns:
- top attribute statistics (up to getCount() number)
-
getComparator
public Comparator<Double> getComparator()
getComparator
- Returns:
- a
Comparatorobject.
-
setComparator
public void setComparator(Comparator<Double> comparator)
setComparator
- Parameters:
comparator- aComparatorobject.
-
-