|
TUM CCSM Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.tum.cs.commons.region.RegionSet
public class RegionSet
Set of Region
objects. Allows tests for containment on the entire set
of regions.
Field Summary | |
---|---|
static java.lang.String |
ANONYMOUS
Name that is used if RegionSet is created without name |
Constructor Summary | |
---|---|
RegionSet()
Creates an unnamed region set. |
|
RegionSet(java.lang.String name)
Creates a named RegionSet . |
Method Summary | ||
---|---|---|
boolean |
add(Region o)
|
|
boolean |
addAll(java.util.Collection<? extends Region> c)
|
|
void |
clear()
|
|
boolean |
contains(int position)
Returns true if the position is contained in one of the Region s
in the RegionSet |
|
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 |
createInverted(java.lang.String name,
int lastPosition)
Creates a new RegionSet whose regions are a complement to this
RegionSet . |
|
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()
|
|
|
toArray(T[] a)
|
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ANONYMOUS
RegionSet
is created without name
Constructor Detail |
---|
public RegionSet(java.lang.String name)
RegionSet
.
name
- Name of this region set.public RegionSet()
Method Detail |
---|
public java.lang.String getName()
public boolean contains(int position)
Region
s
in the RegionSet
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 createInverted(java.lang.String name, int lastPosition)
RegionSet
whose regions are a complement to this
RegionSet
.
Inversion is relative to the interval [0, last position]
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 boolean add(Region o)
add
in interface java.util.Collection<Region>
add
in interface java.util.Set<Region>
public boolean addAll(java.util.Collection<? extends Region> c)
addAll
in interface java.util.Collection<Region>
addAll
in interface java.util.Set<Region>
public void clear()
clear
in interface java.util.Collection<Region>
clear
in interface java.util.Set<Region>
public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection<Region>
contains
in interface java.util.Set<Region>
public boolean containsAll(java.util.Collection<?> c)
containsAll
in interface java.util.Collection<Region>
containsAll
in interface java.util.Set<Region>
public boolean equals(java.lang.Object o)
equals
in interface java.util.Collection<Region>
equals
in interface java.util.Set<Region>
equals
in class java.lang.Object
public int hashCode()
hashCode
in interface java.util.Collection<Region>
hashCode
in interface java.util.Set<Region>
hashCode
in class java.lang.Object
public boolean isEmpty()
isEmpty
in interface java.util.Collection<Region>
isEmpty
in interface java.util.Set<Region>
public java.util.Iterator<Region> iterator()
iterator
in interface java.lang.Iterable<Region>
iterator
in interface java.util.Collection<Region>
iterator
in interface java.util.Set<Region>
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection<Region>
remove
in interface java.util.Set<Region>
public boolean removeAll(java.util.Collection<?> c)
removeAll
in interface java.util.Collection<Region>
removeAll
in interface java.util.Set<Region>
public boolean retainAll(java.util.Collection<?> c)
retainAll
in interface java.util.Collection<Region>
retainAll
in interface java.util.Set<Region>
public int size()
size
in interface java.util.Collection<Region>
size
in interface java.util.Set<Region>
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection<Region>
toArray
in interface java.util.Set<Region>
public <T> T[] toArray(T[] a)
toArray
in interface java.util.Collection<Region>
toArray
in interface java.util.Set<Region>
|
TUM CCSM Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |