Java Code Examples for org.openide.filesystems.FileObject#hashCode()

The following examples show how to use org.openide.filesystems.FileObject#hashCode() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
Source Project: netbeans   File: NotifierKeyRef.java    License: Apache License 2.0 5 votes vote down vote up
public NotifierKeyRef(FileObject fo, KEY key, ReferenceQueue<FileObject> queue, final Notifier<KEY> outer) {
    super(fo, queue);
    this.outer = outer;
    this.key = key;
    this.hash = fo.hashCode();
    if (key != null) {
        Watcher.LOG.log(Level.FINE, "Adding watch for {0}", key);
    }
}
 
Example 2
Source Project: netbeans   File: SourceGroupSupport.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public int hashCode() {
    int hash = 5;
    hash = 53 * hash + (this.sourceGroup != null ? this.sourceGroup.hashCode() : 0);
    FileObject root = getRootFolder();
    hash = 53 * hash + (root != null ? root.hashCode() : 0);
    hash = 53 * hash + (this.name != null ? this.name.hashCode() : 0);
    hash = 53 * hash + (this.displayName != null ? this.displayName.hashCode() : 0);
    return hash;
}
 
Example 3
Source Project: netbeans   File: IndexSearcher.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public int hashCode() {
    final FileObject fo = getFileObject();
    return fo == null ?
        0 :
        fo.hashCode();
}