P - Concrete type of the properties contained in the setpublic interface PropertySet<P extends Property> extends Iterable<P>
| Modifier and Type | Interface and Description |
|---|---|
static interface |
PropertySet.Builder<P extends Property>
Builder to create
PropertySet instances. |
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTEXT_KEY
Default
Context resource reference |
| Modifier and Type | Method and Description |
|---|---|
default List<P> |
asList()
Convert this PropertySet into a
List of properties. |
static <P extends Property> |
builder()
Builder to create and populate a
PropertySet. |
boolean |
contains(Property property)
Return
true if this set contains the given property. |
default <V> V |
execute(Callable<V> operation)
|
static <P extends Property> |
join(PropertySet<? extends P>... propertySets)
Join given
PropertySets and return a new PropertySet containing all the properties of given sets. |
static <P extends Property> |
of(Iterable<P> properties)
Create a new PropertySet containing all given
properties Iterable elements. |
static <P extends Property> |
of(P... properties)
Create a new PropertySet containing given
properties. |
static <P extends Property> |
of(PropertySet<? extends P> propertySet,
P... properties)
|
int |
size()
Returns the number of properties in this set.
|
Stream<P> |
stream()
Returns a sequential
Stream of the Propertys of this set. |
forEach, iterator, spliteratorint size()
boolean contains(Property property)
true if this set contains the given property. If the given property
is null, always returns false.property - Property whose presence in this set is to be testedtrue if this set contains the specified propertyStream<P> stream()
Stream of the Propertys of this set.default List<P> asList()
List of properties.default <V> V execute(Callable<V> operation)
Callable operation on behalf of this PropertySet, i.e. binding this
PropertySet as Context resource to current Thread, and removing the binding after operation execution.V - Operation result typeoperation - Operation to executestatic <P extends Property> PropertySet.Builder<P> builder()
PropertySet.P - Type of the property managed by the property set@SafeVarargs static <P extends Property> PropertySet<P> of(P... properties)
properties.P - Type of the property managed by the property setproperties - Properties of the setstatic <P extends Property> PropertySet<P> of(Iterable<P> properties)
properties Iterable elements.P - Type of the property managed by the property setproperties - Properties of the set@SafeVarargs static <P extends Property> PropertySet<P> of(PropertySet<? extends P> propertySet, P... properties)
P - Property typepropertySet - Source property set (not null)properties - Additional propertiesPropertySet instance containing the properties of given propertySet and any
additional provided property@SafeVarargs static <P extends Property> PropertySet<P> join(PropertySet<? extends P>... propertySets)
PropertySets and return a new PropertySet containing all the properties of given sets.P - Actual property typepropertySets - PropertySet to join (not null and not empty)Copyright © 2017 The Holon Platform. All rights reserved.