|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.opendse.model.Mappings<T,R>
T - the type of tasksR - the type of resourcespublic class Mappings<T extends Task,R extends Resource>
The Mappings represent a set of Mapping elements.
| Field Summary | |
|---|---|
protected java.util.Set<Mapping<T,R>> |
mappings
|
protected java.util.Map<R,java.util.Set<Mapping<T,R>>> |
resourceMappings
|
protected java.util.Map<R,org.apache.commons.collections15.Bag<T>> |
sources
|
protected java.util.Map<T,org.apache.commons.collections15.Bag<R>> |
targets
|
protected java.util.Map<T,java.util.Set<Mapping<T,R>>> |
taskMappings
|
| Constructor Summary | |
|---|---|
Mappings()
|
|
| Method Summary | |
|---|---|
void |
add(Mapping<T,R> mapping)
Adds a mapping. |
java.util.Set<Mapping<T,R>> |
get(R target)
Returns all mappings with the specified target. |
java.util.Set<Mapping<T,R>> |
get(T source)
Returns all mappings with the specified source. |
java.util.Set<Mapping<T,R>> |
get(T source,
R target)
Returns all mappings with the specified source and target. |
java.util.Set<Mapping<T,R>> |
getAll()
Returns all mappings as a set. |
java.util.Set<T> |
getSources(R target)
Returns all sources for a target. |
java.util.Set<R> |
getTargets(T source)
Returns all targets for a source. |
java.util.Iterator<Mapping<T,R>> |
iterator()
|
boolean |
remove(Mapping<T,R> mapping)
Removes a mapping |
boolean |
removeAll(java.util.Collection<Mapping<T,R>> mappings)
|
int |
size()
Returns the number of mappings. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Set<Mapping<T extends Task,R extends Resource>> mappings
protected java.util.Map<T extends Task,java.util.Set<Mapping<T extends Task,R extends Resource>>> taskMappings
protected java.util.Map<R extends Resource,java.util.Set<Mapping<T extends Task,R extends Resource>>> resourceMappings
protected java.util.Map<T extends Task,org.apache.commons.collections15.Bag<R extends Resource>> targets
protected java.util.Map<R extends Resource,org.apache.commons.collections15.Bag<T extends Task>> sources
| Constructor Detail |
|---|
public Mappings()
| Method Detail |
|---|
public void add(Mapping<T,R> mapping)
mapping - the mapping to be addedpublic boolean remove(Mapping<T,R> mapping)
mapping - the mapping to be removed
true if the mapping was removedpublic boolean removeAll(java.util.Collection<Mapping<T,R>> mappings)
public java.util.Iterator<Mapping<T,R>> iterator()
iterator in interface java.lang.Iterable<Mapping<T extends Task,R extends Resource>>public int size()
public java.util.Set<Mapping<T,R>> get(T source)
source - the source
public java.util.Set<R> getTargets(T source)
source - the source
public java.util.Set<Mapping<T,R>> get(R target)
target - the target
public java.util.Set<T> getSources(R target)
target - the target
public java.util.Set<Mapping<T,R>> get(T source,
R target)
source - the sourcetarget - the target
public java.util.Set<Mapping<T,R>> getAll()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||