1 11 package org.eclipse.ltk.internal.ui.refactoring.history; 12 13 import org.eclipse.ltk.core.refactoring.RefactoringDescriptorProxy; 14 15 20 public final class RefactoringHistoryEntry extends RefactoringHistoryNode { 21 22 23 private final RefactoringDescriptorProxy fDescriptorProxy; 24 25 26 private final RefactoringHistoryNode fParent; 27 28 36 public RefactoringHistoryEntry(final RefactoringHistoryNode parent, final RefactoringDescriptorProxy proxy) { 37 fParent= parent; 38 fDescriptorProxy= proxy; 39 } 40 41 44 public boolean equals(final Object object) { 45 if (object instanceof RefactoringHistoryEntry) { 46 final RefactoringHistoryEntry entry= (RefactoringHistoryEntry) object; 47 return getDescriptor().equals(entry.getDescriptor()); 48 } 49 return false; 50 } 51 52 57 public RefactoringDescriptorProxy getDescriptor() { 58 return fDescriptorProxy; 59 } 60 61 64 public int getKind() { 65 return RefactoringHistoryNode.ENTRY; 66 } 67 68 71 public RefactoringHistoryNode getParent() { 72 return fParent; 73 } 74 75 78 public int hashCode() { 79 return getDescriptor().hashCode(); 80 } 81 } 82 | Popular Tags |