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 class
BottomNAttributeStatisticVisitor.AttributeStatisticComparator
static class
BottomNAttributeStatisticVisitor.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 void
afterPropertiesSet()
afterPropertiesSetComparator<Double>
getComparator()
getComparatorInteger
getCount()
getCountSortedSet<AttributeStatistic>
getResults()
getResultsvoid
setComparator(Comparator<Double> comparator)
setComparatorvoid
setCount(Integer count)
setCountvoid
visit(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:
visit
in interfaceAttributeStatisticVisitor
- Parameters:
attribute
- aOnmsAttribute
object.statistic
- a double.
-
afterPropertiesSet
public void afterPropertiesSet()
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceAttributeStatisticVisitorWithResults
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- See Also:
InitializingBean.afterPropertiesSet()
-
getCount
public Integer getCount()
getCount
- Specified by:
getCount
in interfaceAttributeStatisticVisitorWithResults
- Returns:
- a
Integer
object.
-
setCount
public void setCount(Integer count)
setCount
- Specified by:
setCount
in interfaceAttributeStatisticVisitorWithResults
- Parameters:
count
- aInteger
object.
-
getResults
public SortedSet<AttributeStatistic> getResults()
getResults
- Specified by:
getResults
in interfaceAttributeStatisticVisitorWithResults
- Returns:
- top attribute statistics (up to getCount() number)
-
getComparator
public Comparator<Double> getComparator()
getComparator
- Returns:
- a
Comparator
object.
-
setComparator
public void setComparator(Comparator<Double> comparator)
setComparator
- Parameters:
comparator
- aComparator
object.
-
-