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 java.lang.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 java.util.Comparator<java.lang.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()
afterPropertiesSetjava.util.Comparator<java.lang.Double>
getComparator()
getComparatorjava.lang.Integer
getCount()
getCountjava.util.SortedSet<AttributeStatistic>
getResults()
getResultsvoid
setComparator(java.util.Comparator<java.lang.Double> comparator)
setComparatorvoid
setCount(java.lang.Integer count)
setCountvoid
visit(OnmsAttribute attribute, double statistic)
visit
-
-
-
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 java.lang.Integer getCount()
getCount
- Specified by:
getCount
in interfaceAttributeStatisticVisitorWithResults
- Returns:
- a
Integer
object.
-
setCount
public void setCount(java.lang.Integer count)
setCount
- Specified by:
setCount
in interfaceAttributeStatisticVisitorWithResults
- Parameters:
count
- aInteger
object.
-
getResults
public java.util.SortedSet<AttributeStatistic> getResults()
getResults
- Specified by:
getResults
in interfaceAttributeStatisticVisitorWithResults
- Returns:
- top attribute statistics (up to getCount() number)
-
getComparator
public java.util.Comparator<java.lang.Double> getComparator()
getComparator
- Returns:
- a
Comparator
object.
-
setComparator
public void setComparator(java.util.Comparator<java.lang.Double> comparator)
setComparator
- Parameters:
comparator
- aComparator
object.
-
-