public static class OrtSession.Result extends java.lang.Object implements java.lang.AutoCloseable, java.lang.Iterable<java.util.Map.Entry<java.lang.String,OnnxValue>>
Modifier and Type | Method and Description |
---|---|
void |
close() |
OnnxValue |
get(int index)
Gets the value from the container at the specified index.
|
java.util.Optional<OnnxValue> |
get(java.lang.String key)
Gets the value from the container assuming it's not been closed.
|
java.util.Iterator<java.util.Map.Entry<java.lang.String,OnnxValue>> |
iterator() |
int |
size()
Returns the number of outputs in this Result.
|
public void close()
close
in interface java.lang.AutoCloseable
public java.util.Iterator<java.util.Map.Entry<java.lang.String,OnnxValue>> iterator()
iterator
in interface java.lang.Iterable<java.util.Map.Entry<java.lang.String,OnnxValue>>
public OnnxValue get(int index)
IllegalStateException
if the container has been closed, and IndexOutOfBoundsException
if the index is invalid.index
- The index to lookup.public int size()
public java.util.Optional<OnnxValue> get(java.lang.String key)
IllegalStateException
if the container has been closed.key
- The key to lookup.