Changeset 681 for trunk/quest-plugin-php/src/main/java
- Timestamp:
- 08/29/12 10:05:50 (12 years ago)
- Location:
- trunk/quest-plugin-php/src/main/java/de/ugoe/cs/quest/plugin/php/eventcore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-plugin-php/src/main/java/de/ugoe/cs/quest/plugin/php/eventcore/PHPEventTarget.java
r655 r681 1 1 2 package de.ugoe.cs.quest.plugin.php.eventcore; 2 3 … … 49 50 } 50 51 52 @Override 53 public String getStringIdentifier() { 54 return this.toString(); 55 } 56 51 57 /* 52 58 * (non-Javadoc) … … 59 65 } 60 66 67 /* 68 * (non-Javadoc) 69 * 70 * @see java.lang.Object#equals() 71 */ 72 @Override 73 public boolean equals(Object obj) { 74 if (obj instanceof PHPEventTarget) { 75 if (path != null) { 76 return path.equals(((PHPEventTarget) obj).path); 77 } 78 else { 79 return ((PHPEventTarget) obj).path == null; 80 } 81 } 82 return false; 83 } 84 85 /* 86 * (non-Javadoc) 87 * 88 * @see java.lang.Object#hashCode() 89 */ 90 @Override 91 public int hashCode() { 92 int hash = 3; 93 if (path != null) { 94 hash = path.hashCode(); 95 } 96 return hash; 97 } 98 61 99 } -
trunk/quest-plugin-php/src/main/java/de/ugoe/cs/quest/plugin/php/eventcore/PHPEventType.java
r655 r681 1 1 2 package de.ugoe.cs.quest.plugin.php.eventcore; 2 3 … … 27 28 * </p> 28 29 */ 29 private String path;30 private final String path; 30 31 31 32 /** … … 34 35 * </p> 35 36 */ 36 private List<String> postVars;37 private final List<String> postVars; 37 38 38 39 /** … … 41 42 * </p> 42 43 */ 43 private List<String> getVars;44 private final List<String> getVars; 44 45 45 46 /** … … 89 90 } 90 91 92 /* 93 * (non-Javadoc) 94 * 95 * @see java.lang.Object#equals(java.lang.Object) 96 */ 97 @Override 98 public boolean equals(Object obj) { 99 if (obj instanceof PHPEventType) { 100 PHPEventType other = (PHPEventType) obj; 101 return ((path == null && other.path == null) || path.equals(other.path)) && 102 ((postVars == null && other.postVars == null) || postVars.equals(other.postVars)) && 103 ((getVars == null && other.getVars == null) || getVars.equals(other.getVars)); 104 } 105 return false; 106 } 107 108 /* 109 * (non-Javadoc) 110 * 111 * @see java.lang.Object#hashCode() 112 */ 113 @Override 114 public int hashCode() { 115 int hash = 17; 116 int multiplier = 7; 117 if (path != null) { 118 hash = hash * multiplier + path.hashCode(); 119 } 120 if (postVars != null) { 121 hash = hash * multiplier + postVars.hashCode(); 122 } 123 if (getVars != null) { 124 hash = hash * multiplier + getVars.hashCode(); 125 } 126 return hash; 127 } 128 91 129 }
Note: See TracChangeset
for help on using the changeset viewer.