1 11 package org.eclipse.ltk.internal.ui.refactoring.history; 12 13 import org.eclipse.core.runtime.Assert; 14 15 20 public final class RefactoringHistoryProject extends RefactoringHistoryNode { 21 22 23 private final String fProject; 24 25 30 public RefactoringHistoryProject(final String project) { 31 Assert.isNotNull(project); 32 Assert.isTrue(!"".equals(project)); fProject= project; 34 } 35 36 39 public boolean equals(final Object object) { 40 if (object instanceof RefactoringHistoryProject) { 41 final RefactoringHistoryProject node= (RefactoringHistoryProject) object; 42 return super.equals(object) && getProject().equals(node.getProject()) && getKind() == node.getKind(); 43 } 44 return false; 45 } 46 47 50 public int getKind() { 51 return PROJECT; 52 } 53 54 57 public RefactoringHistoryNode getParent() { 58 return null; 59 } 60 61 66 public String getProject() { 67 return fProject; 68 } 69 70 73 public int hashCode() { 74 return super.hashCode() + 17 * getKind() + 31 * getProject().hashCode(); 75 } 76 } | Popular Tags |