public class Bindings extends Object implements Streamable<Bindings.Binding>
Statement
using BindMarkers
.
Bindings are typically immutable.Modifier and Type | Class and Description |
---|---|
static class |
Bindings.Binding
Base class for value objects representing a value or a
NULL binding. |
static class |
Bindings.NullBinding
NULL binding. |
static class |
Bindings.ValueBinding
Value binding.
|
Constructor and Description |
---|
Bindings()
Create empty
Bindings . |
Bindings(Collection<Bindings.Binding> bindings)
|
Modifier and Type | Method and Description |
---|---|
Bindings |
and(Bindings other)
|
void |
apply(BindTarget bindTarget)
Apply the bindings to a
BindTarget . |
static Bindings |
empty()
Create a new, empty
Bindings object. |
void |
forEach(Consumer<? super Bindings.Binding> action)
Performs the given action for each binding of this
Bindings until all bindings have been processed or the
action throws an exception. |
protected Map<BindMarker,Bindings.Binding> |
getBindings() |
Iterator<Bindings.Binding> |
iterator() |
static Bindings |
merge(Bindings left,
Bindings right)
|
Spliterator<Bindings.Binding> |
spliterator() |
public Bindings()
Bindings
.public Bindings(Collection<Bindings.Binding> bindings)
bindings
- must not be null.public static Bindings empty()
Bindings
object.empty
in interface Streamable<Bindings.Binding>
Bindings
object.protected Map<BindMarker,Bindings.Binding> getBindings()
public static Bindings merge(Bindings left, Bindings right)
left
- the left object to merge with.right
- the right object to merge with.Bindings
object.public Bindings and(Bindings other)
other
- the object to merge with.Bindings
object.public void apply(BindTarget bindTarget)
BindTarget
.bindTarget
- the target to apply bindings to.public void forEach(Consumer<? super Bindings.Binding> action)
Bindings
until all bindings have been processed or the
action throws an exception. Actions are performed in the order of iteration (if an iteration order is specified).
Exceptions thrown by the action are relayed to theforEach
in interface Iterable<Bindings.Binding>
action
- The action to be performed for each Bindings.Binding
.public Iterator<Bindings.Binding> iterator()
iterator
in interface Iterable<Bindings.Binding>
public Spliterator<Bindings.Binding> spliterator()
spliterator
in interface Iterable<Bindings.Binding>
Copyright © 2018–2019 Pivotal Software, Inc.. All rights reserved.