@Immutable public class ExecutionEnvironment extends Object implements Serializable
| Constructor and Description |
|---|
ExecutionEnvironment()
Default constructor of an empty environment.
|
ExecutionEnvironment(Collection<String> labels)
Constructor.
|
ExecutionEnvironment(ExecutionEnvironment base,
Collection<String> additionalLabels)
Constructor.
|
ExecutionEnvironment(ExecutionEnvironment base,
String... additionalLabels)
Constructor.
|
ExecutionEnvironment(String... labels)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static ExecutionEnvironment |
any()
Returns an environment without labels, that is it will match all other environments.
|
boolean |
equals(Object o) |
Set<String> |
getLabels()
Returns the labels that define the environment.
|
int |
hashCode() |
boolean |
isMatchFor(ExecutionEnvironment environment)
Tests if this environment satisfies the requirements of the specified environment.
|
boolean |
isUnspecified()
Returns
true if the environment does not specify any labels. |
String |
toString() |
public ExecutionEnvironment()
public ExecutionEnvironment(@CheckForNull
Collection<String> labels)
labels - collection of labels that define the environment.public ExecutionEnvironment(String... labels)
labels - the labels that define the environment.public ExecutionEnvironment(@CheckForNull
ExecutionEnvironment base,
@CheckForNull
Collection<String> additionalLabels)
base - a base ExecutionEnvironment to be extended by the additional labelsadditionalLabels - collection of labels that define the environment.public ExecutionEnvironment(@CheckForNull
ExecutionEnvironment base,
String... additionalLabels)
base - a base ExecutionEnvironment to be extended by the additional labelsadditionalLabels - collection of labels that define the environment.@NonNull public Set<String> getLabels()
public boolean isUnspecified()
true if the environment does not specify any labels.true if the environment does not specify any labels.public boolean isMatchFor(ExecutionEnvironment environment)
environment - the specified environment.true if and only if all the labels required by the specified environment are provided by this
environment.public static ExecutionEnvironment any()
Copyright © 2004-2014. All Rights Reserved.