Changeset 961 for trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLGUIElementSpec.java
- Timestamp:
- 10/30/12 14:02:07 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLGUIElementSpec.java
r950 r961 15 15 package de.ugoe.cs.autoquest.plugin.html.guimodel; 16 16 17 import java.net.URL;18 19 17 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElementSpec; 20 18 … … 32 30 33 31 /** */ 34 private URL pageURL;35 36 /** */37 private String pageTitle;38 39 /** */40 32 private String type; 41 33 42 /** */43 private String id;44 45 /** */46 private int index;47 48 34 /** 49 35 * <p> … … 55 41 * @param id 56 42 */ 57 public HTMLGUIElementSpec(URL pageURL, String pageTitle, String type, String id, int index) { 58 if (pageURL == null) { 59 throw new IllegalArgumentException("page URL must not be null"); 60 } 61 else if (type == null) { 43 HTMLGUIElementSpec(String type) { 44 if (type == null) { 62 45 throw new IllegalArgumentException("type must not be null"); 63 46 } 64 else if ((id == null) && (index < 0)) { 65 throw new IllegalArgumentException 66 ("either id must not be null or the index must be greater or equal to 0"); 67 } 68 69 this.pageURL = pageURL; 70 this.pageTitle = pageTitle; 47 71 48 this.type = type; 72 this.id = id;73 this.index = index;74 49 } 75 50 … … 89 64 if (other instanceof HTMLGUIElementSpec) { 90 65 HTMLGUIElementSpec otherSpec = (HTMLGUIElementSpec) other; 91 92 if (!type.equals(otherSpec.type)) { 93 return false; 94 } 95 96 if (id != null) { 97 return id.equals(otherSpec.id); 98 } 99 else if (index >= 0) { 100 return index == otherSpec.index; 101 } 66 return type.equals(otherSpec.type); 102 67 } 103 68 … … 105 70 } 106 71 107 /**108 * <p>109 * TODO: comment110 * </p>111 *112 * @return113 */114 URL getPageURL() {115 return pageURL;116 }117 118 /**119 * <p>120 * TODO: comment121 * </p>122 *123 * @return124 */125 String getPageTitle() {126 return pageTitle;127 }128 129 /**130 * <p>131 * TODO: comment132 * </p>133 *134 * @return135 */136 String getTagId() {137 return id;138 }139 140 /**141 * <p>142 * TODO: comment143 * </p>144 *145 * @return146 */147 int getIndex() {148 return index;149 }150 151 /**152 * <p>153 * TODO: comment154 * </p>155 *156 * @param htmlguiElementSpec157 */158 void update(HTMLGUIElementSpec htmlguiElementSpec) {159 // TODO Auto-generated method stub160 System.out.println("TODO: implement HTMLGUIElementSpec.update ");161 162 }163 164 72 }
Note: See TracChangeset
for help on using the changeset viewer.