Class GeneratedFeature

  • All Implemented Interfaces:
    Serializable, Cloneable, Iterable<GeneratedObject>, Collection<GeneratedObject>, List<GeneratedObject>, RandomAccess

    public class GeneratedFeature
    extends ArrayList<GeneratedObject>

    A generic feature which can represent any OTS Mindee return prediction.

    The Mindee API can return either lists or objects. Here we represent all features as a list, to simplify any code that interacts with this class.

    If you want, you can "cast" the raw hashmap into one of the standard Mindee fields:

    • StringField - asStringField()
    • AmountField - asAmountField()
    • DateField - asDateField()
    • ClassificationField - asClassificationField()
    This will not work for any feature which is a list in the Mindee return.
    See Also:
    Serialized Form
    • Constructor Detail

      • GeneratedFeature

        public GeneratedFeature​(boolean isList)
        Whether the original feature is a list.
        Parameters:
        isList - Whether the feature is a list.