public class IntCounter extends Counter<Integer> implements ResetCounter, SetCounter<Integer>
| Constructor and Description |
|---|
IntCounter()
Значение по умолчанию = 0.
|
IntCounter(int cnt)
Конструктор
|
IntCounter(IntCounter src)
Конструктор копирования
|
IntCounter(IntCounter src,
Lock lock)
Конструктор копирования
|
IntCounter(int cnt,
Lock lock)
Конструктор
|
IntCounter(Lock lock)
Значение по умолчанию = 0.
|
| Modifier and Type | Method and Description |
|---|---|
IntCounter |
clone()
Создание клона
|
IntCounter |
clone(Lock lock)
Создание клона
|
Class<Integer> |
getType()
Возвращает тип значения счетчика
|
IntCounter |
increment()
Увеличивает счечик и возвращает его значение
|
void |
reset()
Сброс счетчика
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetpublic IntCounter()
public IntCounter(int cnt)
cnt - Начальное значениеpublic IntCounter(Lock lock)
lock - Блокировкаpublic IntCounter(int cnt,
Lock lock)
cnt - начальное значениеlock - блокировкаpublic IntCounter(IntCounter src)
src - образец для копированияpublic IntCounter(IntCounter src, Lock lock)
src - образец для копированияlock - блокировкаpublic IntCounter clone()
public IntCounter clone(Lock lock)
public void reset()
reset in interface ResetCounterpublic IntCounter increment()
Copyright © 2017. All rights reserved.