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> |
Modifier and Type | Field and Description |
---|---|
static int |
PHANTOM |
static int |
REGISTERED |
static int |
RESOLVED |
Constructor and Description |
---|
DependencyTree() |
Modifier and Type | Method and Description |
---|---|
void |
add(K key,
T object) |
DependencyTree.Entry<K,T> |
add(K key,
T object,
Collection<K> requires) |
DependencyTree.Entry<K,T> |
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<T> |
getRegisteredObjects() |
T |
getResolved(K key) |
List<DependencyTree.Entry<K,T>> |
getResolvedEntries()
Entries are sorted so an entry never depends on entries on its right.
|
List<T> |
getResolvedObjects() |
boolean |
isPhantom(K key) |
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 |
unregister(DependencyTree.Entry<K,T> entry) |
void |
unresolve(DependencyTree.Entry<K,T> entry) |
public static final int PHANTOM
public static final int REGISTERED
public static final int RESOLVED
public Iterator<DependencyTree.Entry<K,T>> iterator()
iterator
in interface Iterable<DependencyTree.Entry<K,T>>
public DependencyTree.Entry<K,T> 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 isPhantom(K key)
public boolean isRegistered(K key)
public boolean isResolved(K key)
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.