|
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 String |
ANONYMOUS
Name that is used if RegionSet is created without name |
| Constructor Summary | |
|---|---|
RegionSet()
Creates an unnamed region set. |
|
RegionSet(String name)
Creates a named RegionSet. |
|
| Method Summary | ||
|---|---|---|
boolean |
add(Region o)
|
|
boolean |
addAll(Collection<? extends Region> c)
|
|
void |
clear()
|
|
boolean |
contains(int position)
Returns true if the position is contained in one of the Regions
in the RegionSet |
|
boolean |
contains(Object o)
|
|
boolean |
contains(Region region)
Tests whether all of the positions of the region are contained in the RegionSet |
|
boolean |
containsAll(Collection<?> c)
|
|
boolean |
containsAny(Region region)
Tests whether any of the positions in the region are contained in the RegionSet. |
|
RegionSet |
createInverted(String name,
int lastPosition)
Creates a new RegionSet whose regions are a complement to this
RegionSet. |
|
boolean |
equals(Object o)
|
|
int |
getFirstPosition()
Returns first position in RegionSet. |
|
int |
getLastPosition()
Returns last position in RegionSet. |
|
String |
getName()
Returns the name. |
|
int |
getPositionCount()
Gets the number of positions contained in the RegionSet. |
|
int |
hashCode()
|
|
boolean |
isEmpty()
|
|
Iterator<Region> |
iterator()
|
|
boolean |
positionsEqual(RegionSet other)
Returns true if both RegionSets contain the same positions and
gaps. |
|
boolean |
remove(Object o)
|
|
boolean |
removeAll(Collection<?> c)
|
|
boolean |
retainAll(Collection<?> c)
|
|
int |
size()
|
|
Object[] |
toArray()
|
|
|
toArray(T[] a)
|
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String ANONYMOUS
RegionSet is created without name
| Constructor Detail |
|---|
public RegionSet(String name)
RegionSet.
name - Name of this region set.public RegionSet()
| Method Detail |
|---|
public String getName()
public boolean contains(int position)
Regions
in the RegionSet
public boolean contains(Region region)
RegionSet
public boolean containsAny(Region region)
RegionSet.
public int getPositionCount()
public int getLastPosition()
RegionSet.
IllegalStateException - if RegionSet is emptypublic int getFirstPosition()
RegionSet.
IllegalStateException - if RegionSet is empty
public RegionSet createInverted(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)
RegionSets contain the same positions and
gaps.
public String toString()
toString in class Objectpublic boolean add(Region o)
add in interface Collection<Region>add in interface Set<Region>public boolean addAll(Collection<? extends Region> c)
addAll in interface Collection<Region>addAll in interface Set<Region>public void clear()
clear in interface Collection<Region>clear in interface Set<Region>public boolean contains(Object o)
contains in interface Collection<Region>contains in interface Set<Region>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<Region>containsAll in interface Set<Region>public boolean equals(Object o)
equals in interface Collection<Region>equals in interface Set<Region>equals in class Objectpublic int hashCode()
hashCode in interface Collection<Region>hashCode in interface Set<Region>hashCode in class Objectpublic boolean isEmpty()
isEmpty in interface Collection<Region>isEmpty in interface Set<Region>public Iterator<Region> iterator()
iterator in interface Iterable<Region>iterator in interface Collection<Region>iterator in interface Set<Region>public boolean remove(Object o)
remove in interface Collection<Region>remove in interface Set<Region>public boolean removeAll(Collection<?> c)
removeAll in interface Collection<Region>removeAll in interface Set<Region>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<Region>retainAll in interface Set<Region>public int size()
size in interface Collection<Region>size in interface Set<Region>public Object[] toArray()
toArray in interface Collection<Region>toArray in interface Set<Region>public <T> T[] toArray(T[] a)
toArray in interface Collection<Region>toArray in interface Set<Region>
|
TUM CCSM Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||