1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 23:25:26 +02:00

[cleanup] Improve hash code

This commit is contained in:
Martin Oberhuber 2008-04-24 01:14:10 +00:00
parent 3263fe1cc2
commit a8cd87b8a5

View file

@ -1,9 +1,9 @@
/********************************************************************************
* Copyright (c) 2008 MontaVista Software, Inc.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
*
*
* Contributors:
* Yu-Fen Kuo (MontaVista) - initial API and implementation
* Anna Dushistova (MontaVista) - initial API and implementation
@ -24,7 +24,7 @@ public class TerminalElement extends AbstractResource {
super(terminalServiceSubSystem);
this.name = name;
}
public String getName() {
return name;
}
@ -47,7 +47,7 @@ public class TerminalElement extends AbstractResource {
public int hashCode() {
if (terminalShell != null)
return terminalShell.hashCode() + name.hashCode();
return terminalShell.hashCode() * 37 + name.hashCode();
return name.hashCode() ;
}