- Timestamp:
- 04/13/11 15:53:14 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchCore/src/de/ugoe/cs/eventbench/data/Event.java
r7 r12 1 1 package de.ugoe.cs.eventbench.data; 2 3 import java.security.InvalidParameterException; 2 4 3 5 … … 32 34 33 35 public Event(String type) { 36 if( type==null ) { 37 throw new InvalidParameterException("Event type must not be null"); 38 } 34 39 this.type = type; 35 40 } … … 41 46 } 42 47 if (other instanceof Event<?>) { 43 Event<?> otherToken = (Event<?>) other; 44 return otherToken.type.equals(this.type) 45 && otherToken.target.equals(this.target); 48 Event<?> otherEvent = (Event<?>) other; 49 if( target!=null ) { 50 return type.equals(otherEvent.type) 51 && target.equals(otherEvent.target); 52 } else { 53 return type.equals(otherEvent.type) 54 && target==otherEvent.target; 55 } 46 56 } else { 47 57 return false; … … 70 80 71 81 public String getStandardId() { 72 String id = target + "." + getType(); 82 String id = ""; 83 if( target!=null ) { 84 id += target + "."; 85 } 86 id += getType(); 73 87 if ( idInfo!="" ) { 74 88 id += "." + idInfo;
Note: See TracChangeset
for help on using the changeset viewer.