Package org.snpeff.stats

# Class CountByKey<T>

java.lang.Object
org.snpeff.stats.CountByKey<T>

All Implemented Interfaces:
  `Serializable`

public class CountByKey<T> extends Object implements Serializable
Counters indexed by key. It's a generic version of CountByType

Author:
  pcingola
See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`CountByKey()`

## Method Summary

Modifier and Type
Method
Description
`long`
`get(T key)`
How many counts of this type?
`void`
`inc(T key)`
Increment (by 1)
`void`
`inc(T key, int increment)`
Increment counter for a given type
`boolean`
`isEmpty()`
`Set<T>`
`keySet()`
`long`
`max()`
Maximum count
`long`
`min()`
Minimum count
`int`
`size()`
`String`
`toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### CountByKey

public CountByKey()

## Method Details

### get

public long get(T key)
How many counts of this type?

Parameters:
  `key` -
Returns:

### inc

public void inc(T key)
Increment (by 1)

Parameters:
  `key` -

### inc

public void inc(T key, int increment)
Increment counter for a given type

Parameters:
  `key` -

### isEmpty

public boolean isEmpty()

### keySet

public Set<T> keySet()

### max

public long max()
Maximum count

### min

public long min()
Minimum count

### size

public int size()

### toString

public String toString()

Overrides:
  `toString` in class `Object`