Package io.deephaven.properties
Interface PropertyVisitor
- All Known Implementing Classes:
PropertyVisitorError
,PropertyVisitorPrintStream
,PropertyVisitorStringBase
,PropertyVisitorStringBase.BiConsumerStringImpl
public interface PropertyVisitor
A property visitor is the generic interface for reading property keys and values from a
PropertySet
.- See Also:
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
maybeVisit
(String key, Optional<String> value) A helper method that makesPropertySet.traverse(PropertyVisitor)
implementations cleaner.default void
maybeVisit
(String key, OptionalInt value) A helper method that makesPropertySet.traverse(PropertyVisitor)
implementations cleaner.default void
maybeVisit
(String key, OptionalLong value) A helper method that makesPropertySet.traverse(PropertyVisitor)
implementations cleaner.default void
maybeVisitProperties
(String key, Optional<? extends PropertySet> properties) A helper method that makesPropertySet.traverse(PropertyVisitor)
implementations cleaner.static PropertyVisitor
of
(PrintStream out) static PropertyVisitor
of
(BiConsumer<String, String> consumer) static PropertyVisitor
stderr()
static PropertyVisitor
stdout()
toStringMap
(PropertySet properties) void
Performs this operation on the given key and boolean value.void
Performs this operation on the given key and int value.void
Performs this operation on the given key and long value.void
Performs this operation on the given key and String value.default void
visitProperties
(PropertySet properties) By default, is equivalent toproperties.traverse(this)
.default void
visitProperties
(String key, PropertySet properties) A helper method that recursively builds up the keys based on the provided key, and the keys of the property set.
-
Field Details
-
SEPARATOR
static final char SEPARATOR- See Also:
-
-
Method Details
-
stdout
-
stderr
-
of
-
of
-
toStringMap
-
visit
Performs this operation on the given key and String value.- Parameters:
key
- the keyvalue
- the value
-
visit
Performs this operation on the given key and int value.- Parameters:
key
- the keyvalue
- the value
-
visit
Performs this operation on the given key and long value.- Parameters:
key
- the keyvalue
- the value
-
visit
Performs this operation on the given key and boolean value.- Parameters:
key
- the keyvalue
- the value
-
visitProperties
By default, is equivalent toproperties.traverse(this)
. Implementations may choose to override this method, provided the property set is traversed, and this visitor receives all of the updates.- Parameters:
properties
- the property set
-
visitProperties
A helper method that recursively builds up the keys based on the provided key, and the keys of the property set. The majority of implementations should not override this.- Parameters:
key
- the keyproperties
- the property set
-
maybeVisit
A helper method that makesPropertySet.traverse(PropertyVisitor)
implementations cleaner. Equivalent tovalue.ifPresent(x -> visit(key, x))
. Must not be overridden.- Parameters:
key
- the keyvalue
- the optional value
-
maybeVisit
A helper method that makesPropertySet.traverse(PropertyVisitor)
implementations cleaner. Equivalent tovalue.ifPresent(x -> visit(key, x))
. Must not be overridden.- Parameters:
key
- the keyvalue
- the optional value
-
maybeVisit
A helper method that makesPropertySet.traverse(PropertyVisitor)
implementations cleaner. Equivalent tovalue.ifPresent(x -> visit(key, x))
. Must not be overridden.- Parameters:
key
- the keyvalue
- the optional value
-
maybeVisitProperties
A helper method that makesPropertySet.traverse(PropertyVisitor)
implementations cleaner. Equivalent toproperties.ifPresent(x -> visitProperties(key, x))
. Must not be overridden.- Parameters:
key
- the keyproperties
- the optional value
-