Package com.qfs.util
Interface IRangeUnion
- All Known Implementing Classes:
RangeUnion
Deprecated, for removal: This API element is subject to removal in a future version.
Union of disjoint closed ranges. Ex: [1, 5] U [7, 11].
- Author:
- ActiveViam
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classDeprecated, for removal: This API element is subject to removal in a future version.Definition of a range [a, b], with both ends a and b included in the range. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Deprecated, for removal: This API element is subject to removal in a future version.Sets as empty.computeUpdate(IRangeUnion newRanges) Deprecated, for removal: This API element is subject to removal in a future version.Computes the ranges existing in newRanges but not in this ranges.booleancontains(long element) Deprecated, for removal: This API element is subject to removal in a future version.Indicate if one of the ranges in this union includes the given value.booleancontains(IRangeUnion other) Deprecated, for removal: This API element is subject to removal in a future version.Tests if that the entire union of ranges is included in this union of ranges.Deprecated, for removal: This API element is subject to removal in a future version.Returns all ranges of the union.booleanisEmpty()Deprecated, for removal: This API element is subject to removal in a future version.Returns whether this union is empty or not.merge(IRangeUnion.Range input) Deprecated, for removal: This API element is subject to removal in a future version.Merge a range with previously merged ranges.voidremove(IRangeUnion.Range range) Deprecated, for removal: This API element is subject to removal in a future version.Remove a range in theIRangeUnion.
-
Method Details
-
merge
Deprecated, for removal: This API element is subject to removal in a future version.Merge a range with previously merged ranges.If we call successively merge([1, 3]) and merge([3, 5]) the second call will return [1, 5].
- Parameters:
input- the range to merge.- Returns:
- the larger range containing input and contained in the unions of all ranges merged via the same call.
-
remove
Deprecated, for removal: This API element is subject to removal in a future version.Remove a range in theIRangeUnion. The range to be removed must be one of the disjoint ranges of the union. Otherwise a IllegalArgumentException will be thrown.- Parameters:
range- range to remove
-
getRanges
NavigableSet<IRangeUnion.Range> getRanges()Deprecated, for removal: This API element is subject to removal in a future version.Returns all ranges of the union. The returned ranges are all disjoint and sorted in ascending order. -
contains
boolean contains(long element) Deprecated, for removal: This API element is subject to removal in a future version.Indicate if one of the ranges in this union includes the given value.- Parameters:
element- the value to test for inclusion.- Returns:
- true if a range includes the given value, false otherwise.
-
contains
Deprecated, for removal: This API element is subject to removal in a future version.Tests if that the entire union of ranges is included in this union of ranges.- Parameters:
other- union to test- Returns:
- true if included, false otherwise
-
clear
void clear()Deprecated, for removal: This API element is subject to removal in a future version.Sets as empty. -
isEmpty
boolean isEmpty()Deprecated, for removal: This API element is subject to removal in a future version.Returns whether this union is empty or not. -
computeUpdate
Deprecated, for removal: This API element is subject to removal in a future version.Computes the ranges existing in newRanges but not in this ranges.- Parameters:
newRanges- list of ranges to consider- Returns:
- difference of this union with the other union
-