com.atlassian.jira.web.bean
Class StatisticMapWrapper<K,N extends Number>

java.lang.Object
  extended by java.util.AbstractMap<K,N>
      extended by com.atlassian.jira.web.bean.StatisticMapWrapper<K,N>
All Implemented Interfaces:
Map<K,N>

public class StatisticMapWrapper<K,N extends Number>
extends AbstractMap<K,N>

This is used to store the statistics retrieved by the StatisticAccessorBean. Formerly an inner class in StatisticAccessorBean. Should be moved out as it is accessed by tests Since stats are accessed through this object, it should be made public to allow other classes access to stats generated by the stat bean


Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
StatisticMapWrapper(Map<K,N> statistics, long totalCount, long irrelevantCount)
           
 
Method Summary
 Set<Map.Entry<K,N>> entrySet()
           
 int getIrrelevantCount()
           
 int getIrrelevantPercentage()
           
 long getLargestPercentage()
           
 long getNullKeyValue()
           
 int getPercentage(K key)
           
protected  Map<K,Long> getPercentages()
           
 Map<K,N> getStatistics()
           
 long getTotalCount()
          Return the total number of issues that were matched.
 void setStatistics(Map<K,N> statistics)
           
 
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StatisticMapWrapper

public StatisticMapWrapper(Map<K,N> statistics,
                           long totalCount,
                           long irrelevantCount)
Method Detail

getStatistics

public Map<K,N> getStatistics()

getPercentages

protected Map<K,Long> getPercentages()

getIrrelevantPercentage

public int getIrrelevantPercentage()

setStatistics

public void setStatistics(Map<K,N> statistics)

entrySet

public Set<Map.Entry<K,N>> entrySet()
Specified by:
entrySet in interface Map<K,N extends Number>
Specified by:
entrySet in class AbstractMap<K,N extends Number>

getTotalCount

public long getTotalCount()
Return the total number of issues that were matched.

Returns:
total number of issues that were matched.

getIrrelevantCount

public int getIrrelevantCount()

getLargestPercentage

public long getLargestPercentage()

getPercentage

public int getPercentage(K key)

getNullKeyValue

public long getNullKeyValue()


Copyright © 2002-2012 Atlassian. All Rights Reserved.