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