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 ChildLoadProvider<A,T extends Object,Z ,R> implements LoadProvider <A ,T ,Z ,R>, Cloneable
LoadProvider that returns classes preferentially from those set on it but that also defaults to a wrapped
LoadProvider when a particular class is not set.
| Constructor and Description |
|---|
ChildLoadProvider(LoadProvider
|
| Modifier and Type | Method and Description |
|---|---|
ChildLoadProvider |
clone()
|
ResourceDecoder |
getCacheDecoder()
Returns the
ResourceDecoder to use to decode the resource from the disk cache.
|
ResourceEncoder |
getEncoder()
Returns the
ResourceEncoder to use to write the decoded and transformed resource to the disk cache.
|
ModelLoader |
getModelLoader()
Returns the
ModelLoader to convert from the given model to a data type.
|
ResourceDecoder |
getSourceDecoder()
Returns the
ResourceDecoder to use to decode the resource from the original data.
|
Encoder |
getSourceEncoder()
Returns the
Encoder to use to write the original data to the disk cache.
|
ResourceTranscoder |
getTranscoder()
Returns the
ResourceTranscoder to convert from the decoded and transformed resource into the transcoded resource.
|
void |
setCacheDecoder(ResourceDecoder
Sets the
ResourceDecoder to use for decoding the resource from the disk cache.
|
void |
setEncoder(ResourceEncoder
Sets the
ResourceEncoder to use to write the decoded and transformed resource to the disk cache.
|
void |
setSourceDecoder(ResourceDecoder
Sets the
ResourceDecoder to use to decoding the resource from the original data.
|
void |
setSourceEncoder(Encoder
Sets the
Encoder to use to write the original data to the disk cache.
|
void |
setTranscoder(ResourceTranscoder
Sets the
ResourceTranscoder to use to transcode the decoded resource.
|
public ChildLoadProvider(LoadProvider<A ,T ,Z ,R> parent)
public ModelLoader<A ,T> getModelLoader()
LoadProvider
ModelLoader to convert from the given model to a data type.
public void setCacheDecoder(ResourceDecoder<File ,Z> cacheDecoder)
ResourceDecoder to use for decoding the resource from the disk cache.
cacheDecoder - The decoder to use.
public void setSourceDecoder(ResourceDecoder<T ,Z> sourceDecoder)
ResourceDecoder to use to decoding the resource from the original data.
sourceDecoder - The decoder to use.
public void setEncoder(ResourceEncoder<Z> encoder)
ResourceEncoder to use to write the decoded and transformed resource to the disk cache.
encoder - The encoder to use.
public void setTranscoder(ResourceTranscoder<Z ,R> transcoder)
ResourceTranscoder to use to transcode the decoded resource.
transcoder - The transcoder to use.
public void setSourceEncoder(Encoder<T> sourceEncoder)
Encoder to use to write the original data to the disk cache.
sourceEncoder - The encoder to use.
public ResourceDecoder<File ,Z> getCacheDecoder()
ResourceDecoder to use to decode the resource from the disk cache.
public ResourceDecoder<T ,Z> getSourceDecoder()
ResourceDecoder to use to decode the resource from the original data.
public Encoder<T> getSourceEncoder()
Encoder to use to write the original data to the disk cache.
public ResourceEncoder<Z> getEncoder()
ResourceEncoder to use to write the decoded and transformed resource to the disk cache.
public ResourceTranscoder<Z ,R> getTranscoder()
ResourceTranscoder to convert from the decoded and transformed resource into the transcoded resource.
public ChildLoadProvider<A ,T ,Z ,R> clone()