Package ai.onnxruntime
Class OnnxSequence
- java.lang.Object
-
- ai.onnxruntime.OnnxSequence
-
- All Implemented Interfaces:
OnnxValue,java.lang.AutoCloseable
public class OnnxSequence extends java.lang.Object implements OnnxValue
A sequence ofOnnxValues all of the same type.Supports the types mentioned in "onnxruntime_c_api.h", currently String, Long, Float, Double, Map>String,Float<, Map>Long,Float<.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ai.onnxruntime.OnnxValue
OnnxValue.OnnxValueType
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes this sequence, releasing the native memory backing it and it's elements.SequenceInfogetInfo()Gets the type info object associated with this OnnxValue.OnnxValue.OnnxValueTypegetType()Gets the type of this OnnxValue.java.util.List<java.lang.Object>getValue()Extracts a Java object from the native ONNX type.java.lang.StringtoString()
-
-
-
Method Detail
-
getType
public OnnxValue.OnnxValueType getType()
Description copied from interface:OnnxValueGets the type of this OnnxValue.
-
getValue
public java.util.List<java.lang.Object> getValue() throws OrtExceptionExtracts a Java object from the native ONNX type.Returns either a
Listof boxed primitives,Strings, orMaps.- Specified by:
getValuein interfaceOnnxValue- Returns:
- A Java object containing the value.
- Throws:
OrtException- If the runtime failed to read an element.
-
getInfo
public SequenceInfo getInfo()
Description copied from interface:OnnxValueGets the type info object associated with this OnnxValue.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-