예제 #1
0
파일: Files.java 프로젝트: BIORIMP/biorimp
 /**
  * Create a deep clone of this instance, except for the nested selectors (the list of selectors is
  * a shallow clone of this instance's list).
  *
  * @return a cloned Object.
  */
 public synchronized Object clone() {
   if (isReference()) {
     return getRef().clone();
   }
   Files f = (Files) super.clone();
   f.defaultPatterns = (PatternSet) defaultPatterns.clone();
   f.additionalPatterns = new Vector(additionalPatterns.size());
   for (Iterator iter = additionalPatterns.iterator(); iter.hasNext(); ) {
     PatternSet ps = (PatternSet) iter.next();
     f.additionalPatterns.add(ps.clone());
   }
   return f;
 }
예제 #2
0
파일: Files.java 프로젝트: BIORIMP/biorimp
 /**
  * Construct a new <code>Files</code> collection, shallowly cloned from the specified <code>Files
  * </code>.
  *
  * @param f the <code>Files</code> to use as a template.
  */
 protected Files(Files f) {
   this.defaultPatterns = f.defaultPatterns;
   this.additionalPatterns = f.additionalPatterns;
   this.useDefaultExcludes = f.useDefaultExcludes;
   this.caseSensitive = f.caseSensitive;
   this.followSymlinks = f.followSymlinks;
   this.ds = f.ds;
   setProject(f.getProject());
 }