Java 类org.apache.commons.collections4.map.AbstractReferenceMap.ReferenceStrength 实例源码

项目:terminal-recall    文件:DefaultPODRegistryFactory.java   
public DefaultPODRegistry(){
    podCache = new CachedAdapter<String,IPodData>(new BidiReferenceMap<String,IPodData>(ReferenceStrength.SOFT,ReferenceStrength.SOFT, 64,.75f,true)){

    @Override
    protected IPodData _adapt(String path)
        throws UnsupportedOperationException {
        final PodFile podFile = new PodFile(new File(path));
        try{return podFile.getData();}
        catch (FileLoadException e) {
        final String message = "Failed to parse (understand) POD file/path " + path;
        final RootWindow rootWindow = getRootWindow();
        if( rootWindow == null ){
            System.err.println(message);
            throw new UnsupportedOperationException();
        }
        JOptionPane.showMessageDialog(getRootWindow(),
            "Failed to parse (understand) POD file " + path,
            "Parsing failure", JOptionPane.ERROR_MESSAGE);
        throw new UnsupportedOperationException();
        }//end catch(...)
    }//end _adapt()

    @Override
    protected String _reAdapt(IPodData value)
        throws UnsupportedOperationException {
        throw new UnsupportedOperationException();
    }};

    podCollection.addTarget(podCollectionPrinter, false);
}
项目:terminal-recall    文件:CachedAdapter.java   
public CachedAdapter(){
this(new BidiReferenceMap<U,V>(ReferenceStrength.WEAK,ReferenceStrength.WEAK, 64,.75f,true));
   }