public class FragmentedRangeLong extends LinkedList<RangeLong>
modCount| Constructor and Description |
|---|
FragmentedRangeLong()
Constructor.
|
FragmentedRangeLong(RangeLong r)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRange(long start,
long end)
Add the given range.
|
void |
addRange(RangeLong r) |
void |
addRanges(Collection<RangeLong> ranges)
Add the given ranges.
|
void |
addValue(long value)
Add a single value.
|
boolean |
containsRange(long min,
long max)
Return true if this fragmented data contains the given range of offset.
|
boolean |
containsValue(long val)
Return true if this fragmented data contains the given offset.
|
FragmentedRangeLong |
copy()
Create a copy of this instance.
|
long |
getMax()
Return the maximum value.
|
long |
getMin()
Return the minimum value.
|
long |
getTotalSize()
Return the total size, summing the ranges length.
|
static FragmentedRangeLong |
intersect(FragmentedRangeLong list1,
FragmentedRangeLong list2)
Return the intersection between the 2 fragmented data.
|
RangeLong |
removeBestRangeForSize(long size)
If a range with the exact size exists, it is returned.
|
RangeLong |
removeBiggestRange()
Remove the largest range.
|
Long |
removeFirstValue()
Remove and return the first value, or null if empty.
|
void |
removeRange(long start,
long end)
Remove the given range.
|
void |
removeValue(long value)
Remove a single offset.
|
String |
toString() |
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, set, size, spliterator, toArray, toArrayiteratorequals, hashCode, listIterator, removeRange, subListcontainsAll, isEmpty, removeAll, retainAllfinalize, getClass, notify, notifyAll, wait, wait, waitcontainsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, replaceAll, retainAll, sort, subListparallelStream, removeIf, streampublic FragmentedRangeLong()
public FragmentedRangeLong(RangeLong r)
public static FragmentedRangeLong intersect(FragmentedRangeLong list1, FragmentedRangeLong list2)
public FragmentedRangeLong copy()
public void addRange(RangeLong r)
public void addRange(long start,
long end)
public void addRanges(Collection<RangeLong> ranges)
public void addValue(long value)
public boolean containsValue(long val)
public boolean containsRange(long min,
long max)
public long getMin()
public long getMax()
public RangeLong removeBestRangeForSize(long size)
public RangeLong removeBiggestRange()
public Long removeFirstValue()
public void removeRange(long start,
long end)
public void removeValue(long value)
public long getTotalSize()
public String toString()
toString in class AbstractCollection<RangeLong>Copyright © 2017. All rights reserved.