1 11 package org.eclipse.ltk.internal.ui.refactoring.history; 12 13 18 public abstract class RefactoringHistoryNode { 19 20 21 public static final int COLLECTION= 11; 22 23 24 public static final int DAY= 9; 25 26 27 public static final int ENTRY= 10; 28 29 30 public static final int LAST_MONTH= 5; 31 32 33 public static final int LAST_WEEK= 3; 34 35 36 public static final int MONTH= 7; 37 38 39 public static final int PROJECT= 12; 40 41 42 public static final int THIS_MONTH= 4; 43 44 45 public static final int THIS_WEEK= 2; 46 47 48 public static final int TODAY= 0; 49 50 51 public static final int WEEK= 8; 52 53 54 public static final int YEAR= 6; 55 56 57 public static final int YESTERDAY= 1; 58 59 62 public boolean equals(final Object object) { 63 if (object instanceof RefactoringHistoryNode) { 64 final RefactoringHistoryNode node= (RefactoringHistoryNode) object; 65 final RefactoringHistoryNode parent= getParent(); 66 if (parent != null) { 67 if (!parent.equals(node.getParent())) 68 return false; 69 } else if (node.getParent() != null) 70 return false; 71 return getKind() == node.getKind(); 72 } 73 return false; 74 } 75 76 81 public abstract int getKind(); 82 83 88 public abstract RefactoringHistoryNode getParent(); 89 90 93 public int hashCode() { 94 return (getParent() != null ? getParent().hashCode() : 0) + 31 * getKind(); 95 } 96 } 97 | Popular Tags |