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.eventcore.guimodel; |
---|
16 | |
---|
17 | import java.io.Serializable; |
---|
18 | |
---|
19 | /** |
---|
20 | * <p> |
---|
21 | * Common interface for GUI element specifications. |
---|
22 | * </p> |
---|
23 | * |
---|
24 | * @version 1.0 |
---|
25 | * @author Patrick Harms |
---|
26 | */ |
---|
27 | public interface IGUIElementSpec extends Serializable { |
---|
28 | |
---|
29 | /** |
---|
30 | * <p> |
---|
31 | * Returns a string represenation of the GUI element type that this specification represents. |
---|
32 | * </p> |
---|
33 | * |
---|
34 | * @return |
---|
35 | */ |
---|
36 | public String getType(); |
---|
37 | |
---|
38 | /** |
---|
39 | * <p> |
---|
40 | * Evaluates if two GUI specifications are similar. Similar means that a heuristic determines |
---|
41 | * that the two GUI specifications describe the same GUI element. |
---|
42 | * </p> |
---|
43 | * |
---|
44 | * @param other |
---|
45 | * specification whose similarity to this is evaluated |
---|
46 | * @return true if the specifications are similar; false otherwise |
---|
47 | */ |
---|
48 | public boolean getSimilarity(IGUIElementSpec other); |
---|
49 | |
---|
50 | /** |
---|
51 | * <p> |
---|
52 | * Defines that {@link IGUIElement} implementations have to define equals. |
---|
53 | * </p> |
---|
54 | * |
---|
55 | * @see Object#equals(Object) |
---|
56 | */ |
---|
57 | @Override |
---|
58 | public boolean equals(Object other); |
---|
59 | |
---|
60 | /** |
---|
61 | * <p> |
---|
62 | * Defines that {@link IGUIElement} implementations have to define hashCode. |
---|
63 | * </p> |
---|
64 | * |
---|
65 | * @see Object#hashCode() |
---|
66 | */ |
---|
67 | @Override |
---|
68 | public int hashCode(); |
---|
69 | } |
---|