BinaryView
API Documentation: BinaryView
A view of the binaries that are created and configured as they are required.
Properties
Property | Description |
---|---|
The contents of this view as a Provider of <T> instances. |
Methods
Method | Description |
---|---|
|
Returns a binary view containing the objects in this view of the given type. The returned view is live, so that when matching objects are later added to this view, they are also visible in the filtered binary view. |
|
Registers an action to execute to configure each element in the view matching the given specification. The action is only executed for those elements that are required. Fails if any element has already been finalized. |
|
Registers an action to execute to configure each element in the view. The action is only executed for those elements that are required. Fails if any element has already been finalized. |
|
Registers a closure to execute to configure each element in the view. The action is only executed for those elements that are required. Fails if any matching element has already been finalized. This method is equivalent to view.withType(Foo).configureEach { … }. |
|
Registers a closure to execute to configure each element in the view. The action is only executed for those elements that are required. Fails if any element has already been finalized. |
|
Registers a closure to execute to configure each element in the view matching the given specification. The action is only executed for those elements that are required. Fails if any element has already been finalized. |
|
Registers an action to execute to configure each element in the view. The action is only executed for those elements that are required. Fails if any matching element has already been finalized. This method is equivalent to view.withType(Foo).configureEach { … }. |
|
Returns the contents of this view as a Set of <T> instances. |
|
Returns a list containing the results of applying the given mapper function to each element in the view. |
|
Returns a single list containing all elements yielded from results of mapper function being invoked on each element of this view. |
|
Returns a single list containing all elements matching the given specification. |
Method Details
BinaryView<S> withType(Class<S> type)
Returns a binary view containing the objects in this view of the given type. The returned view is live, so that when matching objects are later added to this view, they are also visible in the filtered binary view.
void configureEach(Spec<? super T> spec, Action<? super T> action)
Registers an action to execute to configure each element in the view matching the given specification. The action is only executed for those elements that are required. Fails if any element has already been finalized.
void configureEach(Action<? super T> action)
Registers an action to execute to configure each element in the view. The action is only executed for those elements that are required. Fails if any element has already been finalized.
void configureEach(Class<S> type, Closure<Void> closure)
Registers a closure to execute to configure each element in the view. The action is only executed for those elements that are required. Fails if any matching element has already been finalized.
This method is equivalent to view.withType(Foo).configureEach { … }
.
void configureEach(Closure<Void> closure)
Registers a closure to execute to configure each element in the view. The action is only executed for those elements that are required. Fails if any element has already been finalized.
void configureEach(Spec<? super T> spec, Closure<Void> closure)
Registers a closure to execute to configure each element in the view matching the given specification. The action is only executed for those elements that are required. Fails if any element has already been finalized.
void configureEach(Class<S> type, Action<? super S> action)
Registers an action to execute to configure each element in the view. The action is only executed for those elements that are required. Fails if any matching element has already been finalized.
This method is equivalent to view.withType(Foo).configureEach { … }
.
Provider<List<S>> map(Transformer<? extends S, ? super T> mapper)
Returns a list containing the results of applying the given mapper function to each element in the view.
The returned Provider is live, and tracks changes of the view.
Provider<List<S>> flatMap(Transformer<? extends Iterable<S>, ? super T> mapper)
Returns a single list containing all elements yielded from results of mapper function being invoked on each element of this view.
The returned Provider is live, and tracks changes of the view.