Changeset 1624 for trunk/autoquest-plugin-uml/src/main/java/de/ugoe/cs/autoquest/plugin/uml/eventcore/UMLTransitionType.java
- Timestamp:
- 07/29/14 14:30:16 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-plugin-uml/src/main/java/de/ugoe/cs/autoquest/plugin/uml/eventcore/UMLTransitionType.java
r1604 r1624 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. 14 1 15 package de.ugoe.cs.autoquest.plugin.uml.eventcore; 2 16 … … 5 19 import de.ugoe.cs.autoquest.eventcore.IEventType; 6 20 7 // TODO comment 21 /** 22 * <p> 23 * Event type for transitions in UML sequence diagrams 24 * </p> 25 * 26 * @author Steffen Herbold 27 */ 8 28 public class UMLTransitionType implements IEventType { 9 29 10 /** */ 30 /** 31 * Id for object serialization. 32 */ 11 33 private static final long serialVersionUID = 1L; 12 34 35 /** 36 * associated UML transition 37 */ 13 38 private final Transition transition; 14 39 40 /** 41 * <p> 42 * Constructor. Creates a new instance. 43 * </p> 44 * 45 * @param transition 46 * the instance 47 */ 15 48 public UMLTransitionType(Transition transition) { 49 if (transition == null) { 50 throw new IllegalArgumentException("Transition must not be null"); 51 } 16 52 this.transition = transition; 17 53 } 18 54 55 /** 56 * <p> 57 * Returns the associated UML element 58 * </p> 59 * 60 * @return 61 */ 19 62 public Transition getTransition() { 20 63 return transition; 21 64 } 22 65 66 /* 67 * (non-Javadoc) 68 * 69 * @see java.lang.Object#equals(java.lang.Object) 70 */ 23 71 @Override 24 72 public boolean equals(Object other) { 25 if ( other==this) {73 if (other == this) { 26 74 return true; 27 75 } 28 if ( other instanceof UMLTransitionType) {76 if (other instanceof UMLTransitionType) { 29 77 return ((UMLTransitionType) other).transition.equals(transition); 30 78 } 31 79 return false; 32 80 }; 33 81 82 /* 83 * (non-Javadoc) 84 * 85 * @see java.lang.Object#hashCode() 86 */ 34 87 @Override 35 88 public int hashCode() { 36 89 return transition.hashCode(); 37 90 } 38 91 92 /* 93 * (non-Javadoc) 94 * 95 * @see de.ugoe.cs.autoquest.eventcore.IEventType#getName() 96 */ 39 97 @Override 40 98 public String getName() { 41 // TODO Auto-generated method stub 42 System.out.println("TODO: implement UMLTransactionType.getName "); 43 return null; 99 return transition.getName(); 44 100 } 45 101
Note: See TracChangeset
for help on using the changeset viewer.