Class ReservedProcessor.ReservedInterval
java.lang.Object
org.infinispan.protostream.annotations.impl.ReservedProcessor.ReservedInterval
- All Implemented Interfaces:
Comparable<ReservedProcessor.ReservedInterval>
- Enclosing class:
ReservedProcessor
private static final class ReservedProcessor.ReservedInterval
extends Object
implements Comparable<ReservedProcessor.ReservedInterval>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionReservedInterval(XClass where, int number) Constructor for numbers.ReservedInterval(XClass where, int from, int to) Constructor for ranges. -
Method Summary
Modifier and TypeMethodDescriptionintprivate booleancontains(int n) (package private) ReservedProcessor.ReservedIntervalfindOverlap(Set<ReservedProcessor.ReservedInterval> numbers) (package private) ReservedProcessor.ReservedIntervalJoins two non-overlapping intervals if possible.private StringtoString()
-
Field Details
-
where
The XClass that made the reservation. -
from
private final int fromLower bound (inclusive). from == to if it is a single reserved number (not a real range). -
to
private final int toUpper bound (inclusive). When undefined it receives the default value Integer.MAX_VALUE, which translates into ProtoReserved.Range.MAX_FIELD for fields and is left as is for enums.
-
-
Constructor Details
-
Method Details
-
findOverlap
-
contains
private boolean contains(int n) -
compareTo
- Specified by:
compareToin interfaceComparable<ReservedProcessor.ReservedInterval>
-
toString
-
rangeAsString
-
join
Joins two non-overlapping intervals if possible. The given internval must come after the current.
-