public class DependencyTree<K,T> extends Object implements Iterable<DependencyTree.Entry<K,T>>
Modifier and Type | Class and Description |
---|---|
static class |
DependencyTree.Entry<K,T> |
Constructor and Description |
---|
DependencyTree() |
Modifier and Type | Method and Description |
---|---|
void |
add(K key,
T object) |
void |
add(K key,
T object,
Collection<K> requires) |
void |
add(K key,
T object,
K... requires) |
void |
clear() |
T |
get(K key) |
Collection<DependencyTree.Entry<K,T>> |
getEntries() |
DependencyTree.Entry<K,T> |
getEntry(K key) |
List<DependencyTree.Entry<K,T>> |
getMissingRequirements() |
List<DependencyTree.Entry<K,T>> |
getPendingEntries() |
List<T> |
getPendingObjects() |
List<DependencyTree.Entry<K,T>> |
getResolvedEntries()
Entries are sorted so an entry never depends on entries on its right.
|
List<T> |
getResolvedObjects() |
boolean |
isRegistered(K key) |
boolean |
isResolved(K key) |
Iterator<DependencyTree.Entry<K,T>> |
iterator() |
void |
remove(K key) |
void |
resolve(DependencyTree.Entry<K,T> entry) |
void |
setEventHandler(org.nuxeo.common.collections.DependencyTree.EventHandler<T> eventHandler) |
void |
unregister(DependencyTree.Entry<K,T> entry) |
void |
unresolve(DependencyTree.Entry<K,T> entry) |
public Iterator<DependencyTree.Entry<K,T>> iterator()
iterator
in interface Iterable<DependencyTree.Entry<K,T>>
public void add(K key, T object, Collection<K> requires)
public void remove(K key)
public void unregister(DependencyTree.Entry<K,T> entry)
public DependencyTree.Entry<K,T> getEntry(K key)
public void resolve(DependencyTree.Entry<K,T> entry)
public void unresolve(DependencyTree.Entry<K,T> entry)
public boolean isRegistered(K key)
public boolean isResolved(K key)
public void setEventHandler(org.nuxeo.common.collections.DependencyTree.EventHandler<T> eventHandler)
public Collection<DependencyTree.Entry<K,T>> getEntries()
public List<DependencyTree.Entry<K,T>> getPendingEntries()
public List<DependencyTree.Entry<K,T>> getMissingRequirements()
public List<DependencyTree.Entry<K,T>> getResolvedEntries()
public void clear()
Copyright © 2015 Nuxeo SA. All rights reserved.