Package com.exedio.cope.util
Class SequenceChecker
- java.lang.Object
-
- com.exedio.cope.util.SequenceChecker
-
public final class SequenceChecker extends Object
Note that this class is not synchronized. If multiple threads access an
SequenceChecker
instance concurrently, it must be synchronized externally.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SequenceChecker.Counter
Deprecated.UseSequenceChecker.Info
instead.static class
SequenceChecker.Info
-
Constructor Summary
Constructors Constructor Description SequenceChecker(int capacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
check(int number)
int
getCapacity()
int
getCountDuplicate()
Deprecated.UseSequenceChecker.Info.getDuplicate()
instead.SequenceChecker.Counter
getCounter()
Deprecated.UsegetInfo()
instead.int
getCountInOrder()
Deprecated.UseSequenceChecker.Info.getInOrder()
instead.int
getCountLate()
Deprecated.UseSequenceChecker.Info.getLate()
instead.int
getCountLost()
Deprecated.UseSequenceChecker.Info.getLost()
instead.int
getCountOutOfOrder()
Deprecated.UseSequenceChecker.Info.getOutOfOrder()
instead.int
getFirstNumber()
SequenceChecker.Info
getInfo()
int
getLength()
Deprecated.UsegetCapacity()
insteadint
getMaxNumber()
-
-
-
Method Detail
-
getCapacity
public int getCapacity()
-
check
public boolean check(int number)
- Returns:
- whether the given number is a duplicate
-
getFirstNumber
public int getFirstNumber()
-
getMaxNumber
public int getMaxNumber()
-
getInfo
public SequenceChecker.Info getInfo()
-
getCounter
@Deprecated public SequenceChecker.Counter getCounter()
Deprecated.UsegetInfo()
instead.
-
getCountInOrder
@Deprecated public int getCountInOrder()
Deprecated.UseSequenceChecker.Info.getInOrder()
instead.
-
getCountOutOfOrder
@Deprecated public int getCountOutOfOrder()
Deprecated.UseSequenceChecker.Info.getOutOfOrder()
instead.
-
getCountDuplicate
@Deprecated public int getCountDuplicate()
Deprecated.UseSequenceChecker.Info.getDuplicate()
instead.
-
getCountLost
@Deprecated public int getCountLost()
Deprecated.UseSequenceChecker.Info.getLost()
instead.
-
getCountLate
@Deprecated public int getCountLate()
Deprecated.UseSequenceChecker.Info.getLate()
instead.
-
getLength
@Deprecated public int getLength()
Deprecated.UsegetCapacity()
instead
-
-