Changeset 1853 for trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskSymbolIdentityMap.java
- Timestamp:
- 12/23/14 11:39:42 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/TaskSymbolIdentityMap.java
r1401 r1853 20 20 21 21 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 22 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInstance;23 22 import de.ugoe.cs.autoquest.usageprofiles.SymbolMap; 24 23 … … 31 30 * @author Patrick Harms 32 31 */ 33 public class TaskSymbolIdentityMap<V> implements SymbolMap<ITask Instance, V> {32 public class TaskSymbolIdentityMap<V> implements SymbolMap<ITask, V> { 34 33 35 34 /** */ … … 48 47 * </p> 49 48 */ 50 private Map<ITask, ITask Instance> symbols;49 private Map<ITask, ITask> symbols; 51 50 52 51 /** … … 57 56 public TaskSymbolIdentityMap() { 58 57 delegate = new HashMap<ITask, V>(); 59 symbols = new HashMap<ITask, ITask Instance>();58 symbols = new HashMap<ITask, ITask>(); 60 59 } 61 60 … … 67 66 * @param other the map to be copied 68 67 */ 69 public TaskSymbolIdentityMap(SymbolMap<ITask Instance, V> other) {68 public TaskSymbolIdentityMap(SymbolMap<ITask, V> other) { 70 69 if (other == null) { 71 70 throw new IllegalArgumentException("other map must not be null"); … … 73 72 74 73 delegate = new HashMap<ITask, V>(); 75 symbols = new HashMap<ITask, ITask Instance>();74 symbols = new HashMap<ITask, ITask>(); 76 75 77 for (ITask Instancesymbol : other.getSymbols()) {78 delegate.put(symbol .getTask(), other.getValue(symbol));79 symbols.put(symbol .getTask(), symbol);76 for (ITask symbol : other.getSymbols()) { 77 delegate.put(symbol, other.getValue(symbol)); 78 symbols.put(symbol, symbol); 80 79 } 81 80 } … … 101 100 */ 102 101 @Override 103 public boolean containsSymbol(ITask Instancesymbol) {102 public boolean containsSymbol(ITask symbol) { 104 103 if (symbol == null) { 105 104 throw new IllegalArgumentException("symbol must not be null"); 106 105 } 107 106 108 return delegate.containsKey(symbol .getTask());107 return delegate.containsKey(symbol); 109 108 } 110 109 … … 113 112 */ 114 113 @Override 115 public V getValue(ITask Instancesymbol) {114 public V getValue(ITask symbol) { 116 115 if (symbol == null) { 117 116 throw new IllegalArgumentException("symbol must not be null"); 118 117 } 119 118 120 return delegate.get(symbol .getTask());119 return delegate.get(symbol); 121 120 } 122 121 … … 125 124 */ 126 125 @Override 127 public void addSymbol(ITask Instancesymbol, V value) {126 public void addSymbol(ITask symbol, V value) { 128 127 if (symbol == null) { 129 128 throw new IllegalArgumentException("symbol must not be null"); 130 129 } 131 130 132 delegate.put(symbol .getTask(), value);133 symbols.put(symbol .getTask(), symbol);131 delegate.put(symbol, value); 132 symbols.put(symbol, symbol); 134 133 } 135 134 … … 138 137 */ 139 138 @Override 140 public V removeSymbol(ITask Instancesymbol) {139 public V removeSymbol(ITask symbol) { 141 140 if (symbol == null) { 142 141 throw new IllegalArgumentException("symbol must not be null"); 143 142 } 144 143 145 symbols.remove(symbol .getTask());146 return delegate.remove(symbol .getTask());144 symbols.remove(symbol); 145 return delegate.remove(symbol); 147 146 } 148 147 … … 151 150 */ 152 151 @Override 153 public Collection<ITask Instance> getSymbols() {152 public Collection<ITask> getSymbols() { 154 153 return symbols.values(); 155 154 }
Note: See TracChangeset
for help on using the changeset viewer.