Changeset 681 for trunk/quest-plugin-guitar/src/main/java/de/ugoe/cs/quest/plugin/guitar/eventcore/GUITAREventType.java
- Timestamp:
- 08/29/12 10:05:50 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/quest-plugin-guitar/src/main/java/de/ugoe/cs/quest/plugin/guitar/eventcore/GUITAREventType.java
r556 r681 1 1 2 package de.ugoe.cs.quest.plugin.guitar.eventcore; 2 3 … … 16 17 /** */ 17 18 private static final long serialVersionUID = 1L; 18 19 19 20 String guitarEventId; 20 21 21 22 public GUITAREventType(String eventId) { 22 23 this.guitarEventId = eventId; 23 24 } 24 25 /* (non-Javadoc) 25 26 /* 27 * (non-Javadoc) 28 * 26 29 * @see de.ugoe.cs.quest.eventcore.IEventType#getName() 27 30 */ … … 30 33 return "GUITAREventType"; 31 34 } 32 35 33 36 /* 34 37 * (non-Javadoc) 38 * 35 39 * @see java.lang.Object#toString() 36 40 */ … … 40 44 } 41 45 46 /* 47 * (non-Javadoc) 48 * 49 * @see java.lang.Object#equals(java.lang.Object) 50 */ 51 @Override 52 public boolean equals(Object obj) { 53 if (obj instanceof GUITAREventType) { 54 if (guitarEventId != null) { 55 return guitarEventId.equals(((GUITAREventType) obj).guitarEventId); 56 } 57 else { 58 return ((GUITAREventType) obj).guitarEventId == null; 59 } 60 } 61 return false; 62 } 63 64 /* 65 * (non-Javadoc) 66 * 67 * @see java.lang.Object#hashCode() 68 */ 69 @Override 70 public int hashCode() { 71 int hash = 37; 72 if (guitarEventId != null) { 73 hash = guitarEventId.hashCode(); 74 } 75 return hash; 76 } 77 42 78 }
Note: See TracChangeset
for help on using the changeset viewer.