public interface PathPropertyBoxAdapter extends PathPropertySetAdapter
Path
expressions to inspect and set PropertyBox
values.Modifier and Type | Interface and Description |
---|---|
static interface |
PathPropertyBoxAdapter.PathPropertyBoxAdapterBuilder
Default builder.
|
PathPropertySetAdapter.Builder<B extends PathPropertySetAdapter.Builder<B,A>,A extends PathPropertySetAdapter>, PathPropertySetAdapter.PathConverter, PathPropertySetAdapter.PathMatcher, PathPropertySetAdapter.PathPropertySetAdapterBuilder, PathPropertySetAdapter.PropertyPath<T>
Modifier and Type | Method and Description |
---|---|
static PathPropertyBoxAdapter.PathPropertyBoxAdapterBuilder |
builder(PropertyBox propertyBox)
Create a new
PathPropertyBoxAdapter builder. |
<T> boolean |
containsValue(Path<T> path)
|
static PathPropertyBoxAdapter |
create(PropertyBox propertyBox)
Create a new
PathPropertyBoxAdapter . |
<T> Optional<T> |
getValue(Path<T> path)
Get the value of the
PropertyBox property which corresponds to given path , if the the
property is present and its value is not null . |
<T> Optional<T> |
getValueOrElse(Path<T> path,
Consumer<Path<T>> valueNotPresent)
Get the value of the
PropertyBox property which corresponds to given path , if the the
property is present and its value is not null . |
<T> Optional<Property<T>> |
setValue(Path<T> path,
T value)
Set the value of the
PropertyBox property which corresponds to given path , if such property
is available. |
builder, contains, contains, create, getPath, getPathIdentifiers, getProperty, getProperty, getProperty, names, paths, propertyPaths
<T> boolean containsValue(Path<T> path)
T
- Property typepath
- Path to check (not null)true
if a property which corresponds to given path
is present and the property
value is not null
<T> Optional<T> getValue(Path<T> path)
PropertyBox
property which corresponds to given path
, if the the
property is present and its value is not null
.T
- Path and value typepath
- Path for which obtain the property value (not null)path
, or an empty Optional if path does
not corresponds to any property or the property has no value<T> Optional<T> getValueOrElse(Path<T> path, Consumer<Path<T>> valueNotPresent)
PropertyBox
property which corresponds to given path
, if the the
property is present and its value is not null
. When no property or value available, invokes the
given Consumer
.T
- Path and value typepath
- Path for which obtain the property value (not null)valueNotPresent
- Consumer to be invoked when a value is not available for given pathpath
, or an empty Optional if path does
not corresponds to any property or the property has no value<T> Optional<Property<T>> setValue(Path<T> path, T value)
PropertyBox
property which corresponds to given path
, if such property
is available.T
- Path and value typepath
- Path for which to set the value (not null)value
- The value to setpath
and for which the value was setted, or an empty
Optional if no property corresponds to given path
Property.PropertyAccessException
- If an error occurred setting the property valueProperty.PropertyReadOnlyException
- If the property is read-onlyValidator.ValidationException
- If property value validation failsstatic PathPropertyBoxAdapter create(PropertyBox propertyBox)
PathPropertyBoxAdapter
.propertyBox
- The PropertyBox
set to use (not null)PathPropertyBoxAdapter
static PathPropertyBoxAdapter.PathPropertyBoxAdapterBuilder builder(PropertyBox propertyBox)
PathPropertyBoxAdapter
builder.propertyBox
- The PropertyBox
set to use (not null)PathPropertyBoxAdapter
builderCopyright © 2019 The Holon Platform. All rights reserved.