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:
StatisticMap<K,N>, Map<K,N>

public class StatisticMapWrapper<K,N extends Number>
extends AbstractMap<K,N>
implements StatisticMap<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()
Specified by:
getStatistics in interface StatisticMap<K,N extends Number>

getPercentages

protected Map<K,Long> getPercentages()

getIrrelevantPercentage

public int getIrrelevantPercentage()
Specified by:
getIrrelevantPercentage in interface StatisticMap<K,N extends Number>

setStatistics

public void setStatistics(Map<K,N> statistics)
Specified by:
setStatistics in interface StatisticMap<K,N extends Number>

entrySet

public Set<Map.Entry<K,N>> entrySet()
Specified by:
entrySet in interface StatisticMap<K,N extends Number>
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.

Specified by:
getTotalCount in interface StatisticMap<K,N extends Number>
Returns:
total number of issues that were matched.

getIrrelevantCount

public int getIrrelevantCount()
Specified by:
getIrrelevantCount in interface StatisticMap<K,N extends Number>

getLargestPercentage

public long getLargestPercentage()
Specified by:
getLargestPercentage in interface StatisticMap<K,N extends Number>

getPercentage

public int getPercentage(K key)
Specified by:
getPercentage in interface StatisticMap<K,N extends Number>

getNullKeyValue

public long getNullKeyValue()
Specified by:
getNullKeyValue in interface StatisticMap<K,N extends Number>


Copyright © 2002-2014 Atlassian. All Rights Reserved.