source: trunk/autoquest-core-events/src/main/java/de/ugoe/cs/autoquest/eventcore/guimodel/IGUIElementSpec.java @ 1181

Last change on this file since 1181 was 990, checked in by pharms, 12 years ago
  • rename of GUI element class hierarchy to type hierarchy, as the other method is also called "getType"
  • corrected some implementations of "getTypeHierarchy" which were not implemented so far.
File size: 2.5 KB
RevLine 
[927]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.
[831]14
[922]15package de.ugoe.cs.autoquest.eventcore.guimodel;
[576]16
[778]17import java.io.Serializable;
18
[576]19/**
20 * <p>
[831]21 * Common interface for GUI element specifications.
[576]22 * </p>
23 *
[966]24 * @version 1.1
25 * @author Patrick Harms, Steffen Herbold
[576]26 */
[778]27public interface IGUIElementSpec extends Serializable {
[576]28
29    /**
30     * <p>
[966]31     * Returns a string representation of the GUI element type that this specification represents.
[576]32     * </p>
[831]33     *
[576]34     * @return
35     */
36    public String getType();
[966]37   
38    /**
39     * <p>
40     * Returns a string array with the names of the classes in the hierarchy of the GUI element that
41     * this specification represents. The first element is the GUI element's class, the second its
42     * parent, the third its grand-parent, etc.
43     * </p>
44     * <p>
45     * In case the class hierarchy is unknown or the GUI elements are not based on
46     * object-orientation, this method should <code>return new String[]{getType()};</code>.
47     * </p>
48     *
49     * @return
50     */
[990]51    public String[] getTypeHierarchy();
[831]52
[576]53    /**
54     * <p>
[831]55     * Evaluates if two GUI specifications are similar. Similar means that a heuristic determines
56     * that the two GUI specifications describe the same GUI element.
[576]57     * </p>
[831]58     *
[597]59     * @param other
[831]60     *            specification whose similarity to this is evaluated
61     * @return true if the specifications are similar; false otherwise
[576]62     */
[597]63    public boolean getSimilarity(IGUIElementSpec other);
[576]64
65    /**
66     * <p>
[831]67     * Defines that {@link IGUIElement} implementations have to define equals.
[576]68     * </p>
[831]69     *
70     * @see Object#equals(Object)
[576]71     */
[831]72    @Override
73    public boolean equals(Object other);
74
[576]75    /**
76     * <p>
[831]77     * Defines that {@link IGUIElement} implementations have to define hashCode.
[576]78     * </p>
[831]79     *
80     * @see Object#hashCode()
[576]81     */
[831]82    @Override
[576]83    public int hashCode();
84}
Note: See TracBrowser for help on using the repository browser.