Java Code Examples for org.eclipse.jdt.internal.core.util.Util#combineHashCodes()

The following examples show how to use org.eclipse.jdt.internal.core.util.Util#combineHashCodes() . 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 check out the related API usage on the sidebar.
Example 1
Source File: SourceMethod.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * @see org.eclipse.jdt.internal.core.JavaElement#hashCode()
 */
public int hashCode() {
   int hash = super.hashCode();
	for (int i = 0, length = this.parameterTypes.length; i < length; i++) {
	    hash = Util.combineHashCodes(hash, this.parameterTypes[i].hashCode());
	}
	return hash;
}
 
Example 2
Source File: BinaryMethod.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * @see org.eclipse.jdt.internal.core.JavaElement#hashCode()
 */
public int hashCode() {
   int hash = super.hashCode();
	for (int i = 0, length = this.parameterTypes.length; i < length; i++) {
	    hash = Util.combineHashCodes(hash, getErasedParameterType(i).hashCode());
	}
	return hash;
}
 
Example 3
Source File: ClassFile.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
public int hashCode() {
	return Util.combineHashCodes(this.name.hashCode(), this.parent.hashCode());
}
 
Example 4
Source File: LambdaExpression.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
public int hashCode() {
	return Util.combineHashCodes(super.hashCode(), this.sourceStart);
}
 
Example 5
Source File: LambdaMethod.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
public int hashCode() {
   return Util.combineHashCodes(super.hashCode(), this.sourceStart);
}
 
Example 6
Source File: ClasspathAttribute.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
public int hashCode() {
 	return Util.combineHashCodes(this.name.hashCode(), this.value.hashCode());
}
 
Example 7
Source File: LocalVariable.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
public int hashCode() {
	return Util.combineHashCodes(this.parent.hashCode(), this.nameStart);
}
 
Example 8
Source File: Initializer.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
public int hashCode() {
	return Util.combineHashCodes(this.parent.hashCode(), this.occurrenceCount);
}
 
Example 9
Source File: JarEntryResource.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
public int hashCode() {
	return Util.combineHashCodes(this.simpleName.hashCode(), this.parent.hashCode());
}
 
Example 10
Source File: PackageFragment.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
public int hashCode() {
	int hash = this.parent.hashCode();
	for (int i = 0, length = this.names.length; i < length; i++)
		hash = Util.combineHashCodes(this.names[i].hashCode(), hash);
	return hash;
}
 
Example 11
Source File: NonJavaResource.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
public int hashCode() {
	return Util.combineHashCodes(this.resource.hashCode(), this.parent.hashCode());
}
 
Example 12
Source File: JavaElement.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Returns the hash code for this Java element. By default,
 * the hash code for an element is a combination of its name
 * and parent's hash code. Elements with other requirements must
 * override this method.
 */
public int hashCode() {
	if (this.parent == null) return super.hashCode();
	return Util.combineHashCodes(getElementName().hashCode(), this.parent.hashCode());
}