Package ai.djl.inference.streaming
Enum StreamingTranslator.Support
- java.lang.Object
-
- java.lang.Enum<StreamingTranslator.Support>
-
- ai.djl.inference.streaming.StreamingTranslator.Support
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<StreamingTranslator.Support>
- Enclosing interface:
- StreamingTranslator<I,O>
public static enum StreamingTranslator.Support extends java.lang.Enum<StreamingTranslator.Support>
What types ofStreamingTranslator.StreamOutputs are supported by aStreamingTranslator.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ASYNCSupportsasync()but notiterative().BOTHSupports bothiterative()andasync().ITERATIVESupportsiterative()but notasync().
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanasync()Returns whether theStreamingTranslatorsupports iterative output.booleaniterative()Returns whether theStreamingTranslatorsupports iterative output.static StreamingTranslator.SupportvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static StreamingTranslator.Support[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ITERATIVE
public static final StreamingTranslator.Support ITERATIVE
Supportsiterative()but notasync().
-
ASYNC
public static final StreamingTranslator.Support ASYNC
Supportsasync()but notiterative().
-
BOTH
public static final StreamingTranslator.Support BOTH
Supports bothiterative()andasync().
-
-
Method Detail
-
values
public static StreamingTranslator.Support[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (StreamingTranslator.Support c : StreamingTranslator.Support.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static StreamingTranslator.Support valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
iterative
public boolean iterative()
Returns whether theStreamingTranslatorsupports iterative output.- Returns:
- whether the
StreamingTranslatorsupports iterative output - See Also:
StreamingTranslator.StreamOutput.getIterativeOutput()
-
async
public boolean async()
Returns whether theStreamingTranslatorsupports iterative output.- Returns:
- whether the
StreamingTranslatorsupports iterative output - See Also:
StreamingTranslator.StreamOutput.getAsyncOutput()
-
-