[1285] | 1 | // Copyright 2012 Georg-August-Universität Göttingen, Germany |
---|
| 2 | // |
---|
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
---|
| 4 | // you may not use this file except in compliance with the License. |
---|
| 5 | // You may obtain a copy of the License at |
---|
| 6 | // |
---|
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
---|
| 8 | // |
---|
| 9 | // Unless required by applicable law or agreed to in writing, software |
---|
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
---|
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
| 12 | // See the License for the specific language governing permissions and |
---|
| 13 | // limitations under the License. |
---|
| 14 | |
---|
| 15 | package de.ugoe.cs.autoquest.tasktrees.temporalrelation; |
---|
| 16 | |
---|
| 17 | import de.ugoe.cs.autoquest.tasktrees.taskequality.TaskEquality; |
---|
[1767] | 18 | import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; |
---|
[1285] | 19 | |
---|
| 20 | /** |
---|
[1401] | 21 | * <p> |
---|
| 22 | * symbol comparator implementation for task instances considering to task instances as equal if |
---|
| 23 | * they refer to the identical task object (comparison of object references). |
---|
| 24 | * </p> |
---|
[1285] | 25 | */ |
---|
[1853] | 26 | class TaskIdentityComparator extends TaskComparator { |
---|
[1285] | 27 | |
---|
| 28 | /** */ |
---|
| 29 | private static final long serialVersionUID = 1L; |
---|
| 30 | |
---|
| 31 | /** |
---|
| 32 | * <p> |
---|
[1401] | 33 | * initializes the parent class with the task equality {@link TaskEquality#IDENTICAL}. |
---|
[1285] | 34 | * </p> |
---|
| 35 | */ |
---|
| 36 | public TaskIdentityComparator() { |
---|
| 37 | super(TaskEquality.IDENTICAL); |
---|
| 38 | } |
---|
[1767] | 39 | |
---|
| 40 | /* (non-Javadoc) |
---|
| 41 | * @see TaskInstanceComparator#equals(ITask, ITask) |
---|
| 42 | */ |
---|
| 43 | @Override |
---|
| 44 | public boolean equals(ITask task1, ITask task2) { |
---|
| 45 | return task1 == task2; |
---|
[1285] | 46 | } |
---|
| 47 | |
---|
| 48 | } |
---|