Package org.nuxeo.common.collections
Class DependencyTree<K,T>
- java.lang.Object
-
- org.nuxeo.common.collections.DependencyTree<K,T>
-
- All Implemented Interfaces:
Iterable<DependencyTree.Entry<K,T>>
- Direct Known Subclasses:
FragmentRegistry
public class DependencyTree<K,T> extends Object implements Iterable<DependencyTree.Entry<K,T>>
- Author:
- Bogdan Stefanescu
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DependencyTree.Entry<K,T>
-
Constructor Summary
Constructors Constructor Description DependencyTree()
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
iterator
public Iterator<DependencyTree.Entry<K,T>> iterator()
-
add
public void add(K key, T object, Collection<K> requires)
-
remove
public void remove(K key)
-
unregister
public void unregister(DependencyTree.Entry<K,T> entry)
-
getEntry
public DependencyTree.Entry<K,T> getEntry(K key)
-
resolve
public void resolve(DependencyTree.Entry<K,T> entry)
-
unresolve
public void unresolve(DependencyTree.Entry<K,T> entry)
-
isRegistered
public boolean isRegistered(K key)
-
isResolved
public boolean isResolved(K key)
-
setEventHandler
public void setEventHandler(org.nuxeo.common.collections.DependencyTree.EventHandler<T> eventHandler)
-
getEntries
public Collection<DependencyTree.Entry<K,T>> getEntries()
-
getPendingEntries
public List<DependencyTree.Entry<K,T>> getPendingEntries()
-
getMissingRequirements
public List<DependencyTree.Entry<K,T>> getMissingRequirements()
-
getResolvedEntries
public List<DependencyTree.Entry<K,T>> getResolvedEntries()
Entries are sorted so an entry never depends on entries on its right.
-
clear
public void clear()
-
updateDependencies
protected void updateDependencies(DependencyTree.Entry<K,T> entry, Collection<K> requires)
-
-