public <C extends Collection<T>,T>C retrieveCollection(String key,Class<C> classCollection,Class<T> classData){
  key=safetyKey(key);
  try {
    File file=new File(cacheDirectory,key);
    Type typeCollection=jolyglot.newParameterizedType(classCollection,classData);
    T data=jolyglot.fromJson(file,typeCollection);
    return (C)data;
  }
 catch (  Exception e) {
    return null;
  }
}

public < C extends Collection < T > , T > C retrieveCollection ( String key , Class < C > classCollection , Class < T > classData ) { key = safetyKey ( key ) ; try { File file = new File ( cacheDirectory , key ) ; Type typeCollection = jolyglot . newParameterizedType ( classCollection , classData ) ; T data = jolyglot . fromJson ( file , typeCollection ) ; return ( C ) data ; } catch ( Exception e ) { return null ; } }
retrieve a collection previously saved .
