Changeset 469 for trunk/quest-core-tasktrees
- Timestamp:
- 07/25/12 12:09:03 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-core-tasktrees/src/main/java/de/ugoe/cs/quest/tasktrees/treeimpl/TaskTreeNodeImpl.java
r467 r469 104 104 //----------------------------------------------------------------------------------------------- 105 105 /* (non-Javadoc) 106 * @see java.lang.Object#equals(java.lang.Object) 107 */ 108 //----------------------------------------------------------------------------------------------- 109 @Override 110 public synchronized boolean equals(Object other) 111 { 112 if (!this.getClass().isInstance(other)) 113 { 114 return false; 115 } 116 else 117 { 118 return equals((TaskTreeNodeImpl) other); 119 } 120 } 121 122 //----------------------------------------------------------------------------------------------- 123 /* (non-Javadoc) 124 * @see de.ugoe.cs.tasktree.treeifc.TaskTreeNode#equals(de.ugoe.cs.tasktree.treeifc.TaskTreeNode) 125 */ 126 //----------------------------------------------------------------------------------------------- 127 @Override 128 public boolean equals(TaskTreeNode other) 129 { 130 if (!this.getClass().isInstance(other)) 131 { 132 return false; 133 } 134 else 135 { 136 return equals((TaskTreeNodeImpl) other); 137 } 138 } 139 140 //----------------------------------------------------------------------------------------------- 141 /* (non-Javadoc) 142 * @see java.lang.Object#equals(java.lang.Object) 143 */ 144 //----------------------------------------------------------------------------------------------- 145 public synchronized boolean equals(TaskTreeNodeImpl other) 146 { 147 if (!this.getClass().isInstance(other)) 148 { 149 return false; 150 } 151 152 if (other.hashCode() != hashCode()) 153 { 154 return false; 155 } 106 * @see de.ugoe.cs.quest.tasktrees.treeifc.TaskTreeNode#equals(TaskTreeNode) 107 */ 108 //----------------------------------------------------------------------------------------------- 109 @Override 110 public boolean equals(TaskTreeNode taskTreeNode) 111 { 112 if (!this.getClass().isInstance(taskTreeNode)) 113 { 114 return false; 115 } 116 117 if (taskTreeNode.hashCode() != hashCode()) 118 { 119 return false; 120 } 121 122 TaskTreeNodeImpl other = (TaskTreeNodeImpl) taskTreeNode; 156 123 157 124 if (mId != other.mId) … … 167 134 synchronized (other) 168 135 { 169 if ((other.mChildren == null) && (mChildren == null)) 170 { 171 return true; 172 } 173 else if (((other.mChildren == null) && (mChildren != null)) || 174 ((other.mChildren != null) && (mChildren == null))) 175 { 176 return false; 136 if (mChildren == null) 137 { 138 return (other.mChildren == null); 139 } 140 else if (other.mChildren == null) 141 { 142 return (mChildren == null); 177 143 } 178 144 else if (other.mChildren.size() != mChildren.size())
Note: See TracChangeset
for help on using the changeset viewer.