source: trunk/autoquest-core-usageprofiles/src/main/java/de/ugoe/cs/autoquest/usageprofiles/SymbolComparator.java @ 1196

Last change on this file since 1196 was 1196, checked in by pharms, 11 years ago
  • remove a find bugs warning
File size: 1.4 KB
Line 
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
15package de.ugoe.cs.autoquest.usageprofiles;
16
17import java.io.Serializable;
18
19/**
20 * <p>
21 * This interface can be used for implementing comparison strategies for symbols.
22 * </p>
23 *
24 * @author Patrick Harms
25 */
26public interface SymbolComparator<T> extends Serializable {
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}
Note: See TracBrowser for help on using the repository browser.