public class SequenceSet extends LinkedNodeList<Sequence> implements Iterable<Long>
Modifier and Type | Class and Description |
---|---|
static class |
SequenceSet.Marshaller |
Constructor and Description |
---|
SequenceSet() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(long value) |
void |
add(Sequence value) |
boolean |
contains(int first,
int last) |
boolean |
contains(long value)
Returns true if the value given is contained within one of the
sequences held in this set.
|
List<Sequence> |
getMissing(long first,
long last) |
List<Sequence> |
getReceived() |
Iterator<Long> |
iterator() |
long |
rangeSize()
Computes the size of this Sequence by summing the values of all
the contained sequences.
|
boolean |
remove(long value)
Removes the given value from the Sequence set, splitting a
contained sequence if necessary.
|
long |
removeFirst()
Removes and returns the first element from this list.
|
Sequence |
removeFirstSequence(long count)
Removes and returns the first sequence that is count range large.
|
Sequence |
removeLastSequence()
Removes and returns the last sequence from this list.
|
public void add(Sequence value)
public boolean add(long value)
value
- the value to add to the listpublic boolean remove(long value)
value
- The value that should be removed from the SequenceSet.public long removeFirst()
NoSuchElementException
- if this list is empty.public Sequence removeLastSequence()
public Sequence removeFirstSequence(long count)
public List<Sequence> getMissing(long first, long last)
public boolean contains(long value)
value
- The value to search for in the set.public boolean contains(int first, int last)
public long rangeSize()
Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.