public final class VisionMetadata
- Object
- VisionMetadata
Optional backend identity and backend-specific diagnostic strings attached
to a vision result. Portable application logic should use typed result
fields first; metadata keys are intentionally not guaranteed across
backends. The values map is immutable.
Constructors
public VisionMetadata(String backendId, Map<String, String> values) | Creates backend metadata with optional diagnostic values. |
public VisionMetadata(String backendId) | Creates metadata containing only the selected backend id. |
Methods
public String getBackendId() | |
public Map<String, String> getValues() | |
public String get(String key) |
Inherited methods
Constructor details
VisionMetadata
public VisionMetadata(String backendId, Map<String, String> values)Creates backend metadata with optional diagnostic values.
Parameters
backendIdString- stable portable backend id
valuesMap<String, String>- backend-specific string diagnostics, defensively copied
VisionMetadata
public VisionMetadata(String backendId)Creates metadata containing only the selected backend id.
Parameters
backendIdString- stable portable backend id
Method details
getBackendId
public String getBackendId()Returns
stable backend identifier such as
apple-vision or ml-kitgetValues
public Map<String, String> getValues()get
public String get(String key)Parameters
keyString- backend-defined diagnostic key
Returns
associated value, or
null