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:
parent
3263fe1cc2
commit
a8cd87b8a5
1 changed files with 4 additions and 4 deletions
|
@ -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() ;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue