Last change
on this file since 1118 was
1060,
checked in by pharms, 11 years ago
|
- extended Trie implementation to be able to use different compare strategies
- implemented a method to determine subsequences of a minimal length that occur most often
|
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 | |
---|
15 | package de.ugoe.cs.autoquest.usageprofiles; |
---|
16 | |
---|
17 | /** |
---|
18 | * <p> |
---|
19 | * Default implementation for the {@link SymbolComparator} using the equals method of the provided |
---|
20 | * symbols for comparison. The {@link #equals(Object, Object)} method will also return true if |
---|
21 | * both symbols are <code>null</code> |
---|
22 | * </p> |
---|
23 | * |
---|
24 | * @author Patrick Harms |
---|
25 | */ |
---|
26 | public class DefaultSymbolComparator<T> implements SymbolComparator<T> { |
---|
27 | |
---|
28 | /* (non-Javadoc) |
---|
29 | * @see de.ugoe.cs.autoquest.tasktrees.temporalrelation.SymbolComparator#equals(java.lang.Object, java.lang.Object) |
---|
30 | */ |
---|
31 | @Override |
---|
32 | public boolean equals(T symbol1, T symbol2) { |
---|
33 | if (symbol1 == null) { |
---|
34 | return (symbol2 == null); |
---|
35 | } |
---|
36 | else { |
---|
37 | return symbol1.equals(symbol2); |
---|
38 | } |
---|
39 | } |
---|
40 | |
---|
41 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.