Interface DependencyChain
Immutable chain of dependency keys assembled while constructing dependency-injected
instances.
-
Method Summary
Modifier and TypeMethodDescriptionstatic DependencyChain
empty()
Returns an empty dependency chain.boolean
hasDependency
(Key<?> key) Indicates if the given key is contained in this dependency chain.boolean
isEmpty()
Indicates whether this dependency chain is empty.static DependencyChain
Returns a dependency chain containing a single key.withDependency
(Key<?> key) Returns a new dependency chain containing the provided key as an additional dependency.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
hasDependency
Indicates if the given key is contained in this dependency chain. -
withDependency
Returns a new dependency chain containing the provided key as an additional dependency. If the given key already exists, then it will not be added to the chain. -
isEmpty
boolean isEmpty()Indicates whether this dependency chain is empty. -
empty
Returns an empty dependency chain. -
of
Returns a dependency chain containing a single key.
-