A - The type of the model the resource will be loaded from.T - The type of the data that will be retrieved for the model.Z - The type of the resource that will be decoded from the data.R - The type of the resource that will be transcoded from the decoded resource.public class FixedLoadProvider<A,T,Z,R> extends Object implements LoadProvider<A,T,Z,R>
LoadProvider that sets the classes it provides using non null arguments in its
constructor.| Constructor and Description |
|---|
FixedLoadProvider(ModelLoader<A,T> modelLoader,
ResourceTranscoder<Z,R> transcoder,
DataLoadProvider<T,Z> dataLoadProvider) |
| Modifier and Type | Method and Description |
|---|---|
ResourceDecoder<File,Z> |
getCacheDecoder()
Returns the
ResourceDecoder to use to decode the resource from the disk cache. |
ResourceEncoder<Z> |
getEncoder()
Returns the
ResourceEncoder to use to write the decoded and transformed resource
to the disk cache. |
ModelLoader<A,T> |
getModelLoader()
Returns the
ModelLoader to convert from the given model to a data type. |
ResourceDecoder<T,Z> |
getSourceDecoder()
Returns the
ResourceDecoder to use to decode the resource from the original data. |
Encoder<T> |
getSourceEncoder()
Returns the
Encoder to use to write the original data to the disk cache. |
ResourceTranscoder<Z,R> |
getTranscoder()
Returns the
ResourceTranscoder to convert from the decoded
and transformed resource into the transcoded resource. |
public FixedLoadProvider(ModelLoader<A,T> modelLoader, ResourceTranscoder<Z,R> transcoder, DataLoadProvider<T,Z> dataLoadProvider)
public ModelLoader<A,T> getModelLoader()
ModelLoader to convert from the given model to a data type.getModelLoader in interface LoadProvider<A,T,Z,R>public ResourceTranscoder<Z,R> getTranscoder()
ResourceTranscoder to convert from the decoded
and transformed resource into the transcoded resource.getTranscoder in interface LoadProvider<A,T,Z,R>public ResourceDecoder<File,Z> getCacheDecoder()
ResourceDecoder to use to decode the resource from the disk cache.getCacheDecoder in interface DataLoadProvider<T,Z>public ResourceDecoder<T,Z> getSourceDecoder()
ResourceDecoder to use to decode the resource from the original data.getSourceDecoder in interface DataLoadProvider<T,Z>public Encoder<T> getSourceEncoder()
Encoder to use to write the original data to the disk cache.getSourceEncoder in interface DataLoadProvider<T,Z>public ResourceEncoder<Z> getEncoder()
ResourceEncoder to use to write the decoded and transformed resource
to the disk cache.getEncoder in interface DataLoadProvider<T,Z>