public class FragmentedRangeLong extends LinkedList<RangeLong>
| Modifier and Type | Class and Description |
|---|---|
static class |
FragmentedRangeLong.Parser
String parser.
|
modCount| Constructor and Description |
|---|
FragmentedRangeLong()
Constructor.
|
FragmentedRangeLong(RangeLong r)
Constructor.
|
FragmentedRangeLong(String string)
Parse from string.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCopy(Collection<RangeLong> col)
Add the given ranges.
|
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 |
containsOneValueIn(Collection<RangeLong> ranges)
Return true if this fragmented range contains at least one value of the given ranges.
|
boolean |
containsOneValueIn(RangeLong range)
Return true if this fragmented range contains at least one value of the given range.
|
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.
|
long |
removeValueAt(long index)
Remove a value by index.
|
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 FragmentedRangeLong(String string) throws ParseException
ParseExceptionpublic 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 boolean containsOneValueIn(RangeLong range)
public boolean containsOneValueIn(Collection<RangeLong> ranges)
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 long removeValueAt(long index)
public void addCopy(Collection<RangeLong> col)
public String toString()
toString in class AbstractCollection<RangeLong>Copyright © 2019. All rights reserved.