1 16 package org.apache.commons.vfs; 17 18 19 24 public abstract class FileSystemConfigBuilder 25 { 26 protected void setParam(FileSystemOptions opts, String name, Object value) 27 { 28 opts.setOption(getConfigClass(), name, value); 29 } 30 31 protected Object getParam(FileSystemOptions opts, String name) 32 { 33 if (opts == null) 34 { 35 return null; 36 } 37 38 return opts.getOption(getConfigClass(), name); 39 } 40 41 protected boolean hasParam(FileSystemOptions opts, String name) 42 { 43 if (opts == null) 44 { 45 return false; 46 } 47 48 return opts.hasOption(getConfigClass(), name); 49 } 50 51 protected abstract Class getConfigClass(); 52 } 53 | Popular Tags |