Class MedicalCertificateRecognizerResultLruStorage
-
- All Implemented Interfaces:
-
io.scanbot.sdk.ui.result.ResultStorage
public final class MedicalCertificateRecognizerResultLruStorage implements ResultStorage<MedicalCertificateRecognizerResult>
Stores and provides access to the scanning result of the given type by ResultId This implementation uses LRU cache as a storage to keep the memory usage low even if many results will be added to the storage
-
-
Field Summary
Fields Modifier and Type Field Description public final static Integer
LRU_CACHE_SIZE
private final Class<MedicalCertificateRecognizerResult>
acceptedType
-
Constructor Summary
Constructors Constructor Description MedicalCertificateRecognizerResultLruStorage()
-
Method Summary
Modifier and Type Method Description Class<MedicalCertificateRecognizerResult>
getAcceptedType()
Unit
putResult(String resultId, MedicalCertificateRecognizerResult result)
Puts the given result to the storage on the given id MedicalCertificateRecognizerResult
getResult(String resultId)
Returns the result from the storage according to the given id Unit
removeResult(String resultId)
Removes the result from the storage according to the given id Unit
clear()
Removes all the results from the storage -
-
Method Detail
-
getAcceptedType
Class<MedicalCertificateRecognizerResult> getAcceptedType()
-
putResult
Unit putResult(String resultId, MedicalCertificateRecognizerResult result)
Puts the given result to the storage on the given id
- Parameters:
resultId
- id to store the result onresult
- result to store
-
getResult
MedicalCertificateRecognizerResult getResult(String resultId)
Returns the result from the storage according to the given id
- Parameters:
resultId
- id to return the result from
-
removeResult
Unit removeResult(String resultId)
Removes the result from the storage according to the given id
- Parameters:
resultId
- id to remove the result on
-
-
-
-