Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ANONYMOUS
Name that is used if
RegionSet is created without name |
Constructor and Description |
---|
RegionSet()
Creates an unnamed region set.
|
RegionSet(java.lang.String name)
Creates a named
RegionSet . |
Modifier and Type | Method and Description |
---|---|
boolean |
add(Region o) |
boolean |
addAll(java.util.Collection<? extends Region> c) |
void |
clear() |
boolean |
contains(int position)
|
boolean |
contains(java.lang.Object o) |
boolean |
contains(Region region)
Tests whether all of the positions of the region are contained in the
RegionSet |
boolean |
containsAll(java.util.Collection<?> c) |
boolean |
containsAny(Region region)
Tests whether any of the positions in the region are contained in the
RegionSet . |
RegionSet |
createCompact()
Creates a new
RegionSet whose regions are a compactified version
of this region set, i.e. |
RegionSet |
createInverted(java.lang.String name,
int lastPosition)
|
boolean |
equals(java.lang.Object o) |
int |
getFirstPosition()
Returns first position in
RegionSet . |
int |
getLastPosition()
Returns last position in
RegionSet . |
java.lang.String |
getName()
Returns the name.
|
int |
getPositionCount()
Gets the number of positions contained in the RegionSet.
|
int |
hashCode() |
boolean |
isEmpty() |
java.util.Iterator<Region> |
iterator() |
boolean |
positionsEqual(RegionSet other)
Returns true if both
RegionSet s contain the same positions and
gaps. |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(java.util.Collection<?> c) |
int |
size() |
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
java.lang.String |
toString() |
public static final java.lang.String ANONYMOUS
RegionSet
is created without namepublic RegionSet(java.lang.String name)
RegionSet
.name
- Name of this region set.public RegionSet()
public java.lang.String getName()
public boolean contains(int position)
public boolean contains(Region region)
RegionSet
public boolean containsAny(Region region)
RegionSet
.public int getPositionCount()
public int getLastPosition()
RegionSet
.java.lang.IllegalStateException
- if RegionSet
is emptypublic int getFirstPosition()
RegionSet
.java.lang.IllegalStateException
- if RegionSet
is emptypublic RegionSet createCompact()
RegionSet
whose regions are a compactified version
of this region set, i.e. the returned set is the minimal set that creates
the same answers for all possible contains(int)
queries.public RegionSet createInverted(java.lang.String name, int lastPosition)
public boolean positionsEqual(RegionSet other)
RegionSet
s contain the same positions and
gaps.public java.lang.String toString()
toString
in class java.lang.Object
public void clear()
public boolean contains(java.lang.Object o)
public boolean containsAll(java.util.Collection<?> c)
public boolean equals(java.lang.Object o)
public int hashCode()
public boolean isEmpty()
public boolean remove(java.lang.Object o)
public boolean removeAll(java.util.Collection<?> c)
public boolean retainAll(java.util.Collection<?> c)
public int size()
public java.lang.Object[] toArray()