Package ai.djl.serving.workflow
Class WorkflowExpression.Item
java.lang.Object
ai.djl.serving.workflow.WorkflowExpression.Item
- Enclosing class:
- WorkflowExpression
An item in the expression which contains either a string or another
WorkflowExpression
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The type of contents stored in the item. -
Constructor Summary
ConstructorDescriptionItem
(ai.djl.modality.Input input) Constructs anWorkflowExpression.Item
containing anInput
.Item
(WorkflowExpression expression) Constructs anWorkflowExpression.Item
containing aWorkflowExpression
.Constructs anWorkflowExpression.Item
containing a string. -
Method Summary
Modifier and TypeMethodDescriptionReturns the expression value or throws an exception if it does not contain an expression.ai.djl.modality.Input
getInput()
Returns the input value or throws an exception if it does not contain an input.Returns the type of item.getList()
Returns the expression value as a list.Returns the string value or throws an exception if it does not contain a string.
-
Constructor Details
-
Item
Constructs anWorkflowExpression.Item
containing a string.- Parameters:
string
- the string
-
Item
Constructs anWorkflowExpression.Item
containing aWorkflowExpression
.- Parameters:
expression
- the expression
-
Item
public Item(ai.djl.modality.Input input) Constructs anWorkflowExpression.Item
containing anInput
.- Parameters:
input
- the input
-
-
Method Details
-
getString
Returns the string value or throws an exception if it does not contain a string.- Returns:
- the string value or throws an exception if it does not contain a string
-
getExpression
Returns the expression value or throws an exception if it does not contain an expression.- Returns:
- the expression value or throws an exception if it does not contain an expression
-
getInput
public ai.djl.modality.Input getInput()Returns the input value or throws an exception if it does not contain an input.- Returns:
- the input value or throws an exception if it does not contain an input
-
getItemType
Returns the type of item.- Returns:
- the type of item
-
getList
Returns the expression value as a list.- Returns:
- the expression value as a list.
-