public static class SequenceNumberRange.GenericSequenceNumberRange extends Object implements SequenceNumberRange
SequenceNumberRange.GenericSequenceNumberRange
Constructor and Description |
---|
GenericSequenceNumberRange(SequenceNumber.GenericSequenceNumber from,
SequenceNumber.GenericSequenceNumber to) |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(SequenceNumber sqn) |
SequenceNumber |
from()
Inclusive.
|
boolean |
isEmpty() |
long |
size() |
SequenceNumber |
to()
Exclusive.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
generic
public GenericSequenceNumberRange(SequenceNumber.GenericSequenceNumber from, SequenceNumber.GenericSequenceNumber to)
public SequenceNumber from()
SequenceNumberRange
from
in interface SequenceNumberRange
public SequenceNumber to()
SequenceNumberRange
to
in interface SequenceNumberRange
public long size()
size
in interface SequenceNumberRange
public boolean contains(SequenceNumber sqn)
contains
in interface SequenceNumberRange
SequenceNumberRange.from()
< sqn < SequenceNumberRange.to()
(this implies that the range is not
empty, i.e. to > from))public boolean isEmpty()
isEmpty
in interface SequenceNumberRange
SequenceNumberRange.from()
≥ SequenceNumberRange.to()
, false otherwise.Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.