Class VisionMetadata

java.lang.Object
com.codename1.ai.vision.VisionMetadata

public final class VisionMetadata extends Object
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.
  • Constructor Details

    • VisionMetadata

      public VisionMetadata(String backendId, Map<String,String> values)
      Creates backend metadata with optional diagnostic values.
      Parameters:
      backendId - stable portable backend id
      values - backend-specific string diagnostics, defensively copied
    • VisionMetadata

      public VisionMetadata(String backendId)
      Creates metadata containing only the selected backend id.
      Parameters:
      backendId - stable portable backend id
  • Method Details

    • getBackendId

      public String getBackendId()
      Returns:
      stable backend identifier such as apple-vision or ml-kit
    • getValues

      public Map<String,String> getValues()
    • get

      public String get(String key)
      Parameters:
      key - backend-defined diagnostic key
      Returns:
      associated value, or null