1 19 package org.openide.filesystems.localfs; 20 21 import org.netbeans.performance.DataDescriptor; 22 23 import java.io.File ; 24 25 28 final class LFSDataDescriptor extends DataDescriptor { 29 30 private transient File rootDir; 32 private int foCount; 33 34 35 public LFSDataDescriptor(int count) { 36 this.foCount = count; 37 } 38 39 40 final void setFile(File root) { 41 this.rootDir = root; 42 } 43 44 45 final int getFileNo() { 46 return foCount; 47 } 48 49 50 final File getRootDir() { 51 return rootDir; 52 } 53 54 55 public int hashCode() { 56 return getClassName().hashCode(); 57 } 58 59 60 public boolean equals(Object obj) { 61 if (obj == this) { 62 return true; 63 } 64 65 if (obj instanceof LFSDataDescriptor) { 66 LFSDataDescriptor dd = (LFSDataDescriptor) obj; 67 return getClassName().equals(dd.getClassName()) && foCount == dd.foCount; 68 } 69 70 return false; 71 } 72 73 public String toString() { 74 return super.toString() + " root: " + rootDir + " foCount: " + foCount + " " + System.identityHashCode(this); 75 } 76 } 77 | Popular Tags |