Package org.apache.nifi.util
Interface StringSelector
public interface StringSelector
Fluent api for checking one or more strings and selecting the first non-empty one.
returns the first encountered non-empty string or "".
invalid reference
#toString()
Optimized so that no intermediary objects are created, only one, once the first non-empty string is found.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionboolean
found()
May be used to stop processing subsequent inputs when a result is already available.static StringSelector
Starts the fluent expression by checking the first string(s).Check the next string(s).
-
Field Details
-
EMPTY_STRING_SELECTOR
-
-
Method Details
-
of
Starts the fluent expression by checking the first string(s).- Parameters:
strings
- The first string(s) to check if empty.- Returns:
- a
StringSelector
that checked the first string.
-
or
Check the next string(s).- Parameters:
strings
- The next string(s) to check if empty.- Returns:
- a
StringSelector
that checked all strings so far.
-
found
boolean found()May be used to stop processing subsequent inputs when a result is already available.- Returns:
- true if a non-empty string has been found, false otherwise.
-