Example usage for org.eclipse.jface.viewers IElementComparer hashCode

List of usage examples for org.eclipse.jface.viewers IElementComparer hashCode

Introduction

In this page you can find the example usage for org.eclipse.jface.viewers IElementComparer hashCode.

Prototype

int hashCode(Object element);

Source Link

Document

Returns the hash code for the given element.

Usage

From source file:org.eclipse.tcf.te.ui.views.internal.ViewViewerComparer.java

License:Open Source License

@Override
public int hashCode(Object element) {
    if (element != null) {
        if (byDefault)
            return element.hashCode();
        IElementComparer comparer = (IElementComparer) Platform.getAdapterManager().getAdapter(element,
                IElementComparer.class);
        if (comparer != null) {
            return comparer.hashCode(element);
        }/*from   ww  w .j a va  2 s. c  o  m*/
        return element.hashCode();
    }
    return 0;
}