class LabelReader
extends java.lang.Object
| Constructor and Description |
|---|
LabelReader(java.lang.String taskName,
Labels labels)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Optional<java.lang.String> |
getOptional(java.lang.String key)
Returns the requested label value, or an empty Optional if the value was not found.
|
protected java.lang.String |
getOrThrow(java.lang.String key)
Returns the requested label value, or throws an exception if the value was not found.
|
LabelReader(java.lang.String taskName,
Labels labels)
taskName - the name of the task, only used in error messages if there are problems with the label contentlabels - the labels to be read fromprotected java.lang.String getOrThrow(java.lang.String key)
throws TaskException
TaskExceptionprotected java.util.Optional<java.lang.String> getOptional(java.lang.String key)