[1060] | 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.usageprofiles; |
---|
| 16 | |
---|
| 17 | /** |
---|
| 18 | * <p> |
---|
| 19 | * This interface can be used for implementing comparison strategies for symbols. |
---|
| 20 | * </p> |
---|
| 21 | * |
---|
| 22 | * @author Patrick Harms |
---|
| 23 | */ |
---|
| 24 | public interface SymbolComparator<T> { |
---|
| 25 | |
---|
| 26 | /** |
---|
| 27 | * <p> |
---|
| 28 | * compares two symbols and returns true, if the concrete comparison strategy sees both |
---|
| 29 | * symbols as equal. The method must be commutative, i.e., |
---|
| 30 | * <code>equals(symbol1, symbol2) == equals(symbol2, symbol1)</code>. |
---|
| 31 | * </p> |
---|
| 32 | * |
---|
| 33 | * @param symbol1 the first symbol to be compared |
---|
| 34 | * @param symbol2 the second symbol to be compared |
---|
| 35 | * |
---|
| 36 | * @return true if the comparison strategy sees both symbols as equal, false else. |
---|
| 37 | */ |
---|
| 38 | public boolean equals(T symbol1, T symbol2); |
---|
| 39 | } |
---|