public class ConstEnumCounters<E extends Enum<E>> extends EnumCounters<E>
EnumCounters
Modifier and Type | Class and Description |
---|---|
static class |
ConstEnumCounters.ConstEnumException
An exception class for modification on ConstEnumCounters.
|
EnumCounters.Factory<E extends Enum<E>,C extends EnumCounters<E>>, EnumCounters.Map<K,E extends Enum<E>,C extends EnumCounters<E>>
Constructor and Description |
---|
ConstEnumCounters(Class<E> enumClass,
long defaultVal) |
Modifier and Type | Method and Description |
---|---|
void |
add(E e,
long value)
Add the given value to counter e.
|
void |
add(EnumCounters<E> that)
Add that counters to this counters.
|
void |
negation()
Negate all counters.
|
void |
reset()
Reset all counters to zero.
|
void |
reset(long val) |
void |
set(E e,
long value)
Set counter e to the given value.
|
void |
set(EnumCounters<E> that)
Set this counters to that counters.
|
void |
subtract(E e,
long value)
Subtract the given value from counter e.
|
void |
subtract(EnumCounters<E> that)
Subtract this counters from that counters.
|
allLessOrEqual, anyGreaterOrEqual, asArray, deepCopyEnumCounter, equals, get, hashCode, sum, toString
public final void negation()
EnumCounters
negation
in class EnumCounters<E extends Enum<E>>
public final void set(E e, long value)
EnumCounters
set
in class EnumCounters<E extends Enum<E>>
public final void set(EnumCounters<E> that)
EnumCounters
set
in class EnumCounters<E extends Enum<E>>
public final void reset()
EnumCounters
reset
in class EnumCounters<E extends Enum<E>>
public final void add(E e, long value)
EnumCounters
add
in class EnumCounters<E extends Enum<E>>
public final void add(EnumCounters<E> that)
EnumCounters
add
in class EnumCounters<E extends Enum<E>>
public final void subtract(E e, long value)
EnumCounters
subtract
in class EnumCounters<E extends Enum<E>>
public final void subtract(EnumCounters<E> that)
EnumCounters
subtract
in class EnumCounters<E extends Enum<E>>
public final void reset(long val)
reset
in class EnumCounters<E extends Enum<E>>
Copyright © 2019 Apache Software Foundation. All Rights Reserved.