- Timestamp:
- 09/27/11 20:09:17 (13 years ago)
- Location:
- trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/AbstractTrainCommand.java
r184 r203 2 2 3 3 import java.security.InvalidParameterException; 4 import java.util.Collection; 4 5 import java.util.List; 5 6 … … 68 69 } 69 70 70 List<List<Event<?>>> sequences = null;71 Collection<List<Event<?>>> sequences = null; 71 72 Object dataObject = GlobalDataContainer.getInstance().getData( 72 73 sequencesName); … … 77 78 } 78 79 try { 79 sequences = ( List<List<Event<?>>>) dataObject;80 sequences = (Collection<List<Event<?>>>) dataObject; 80 81 } catch (ClassCastException e) { 81 82 Console.println("Object " + sequencesName 82 + "not of type List<List<Event<?>>>."); 83 + "not of type Collection<List<Event<?>>>."); 84 return; 83 85 } 86 /* TODO implement better type check 84 87 if (sequences.size() == 0 || !(sequences.get(0).get(0) instanceof Event) ) { 85 88 Console.println("Object " + sequencesName 86 + "not of type List<List<Event<?>>>.");89 + "not of type Collection<List<Event<?>>>."); 87 90 return; 88 91 } 92 */ 89 93 90 94 TrieBasedModel model = createModel(); -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDgenerateRandomReplay.java
r171 r203 2 2 3 3 import java.security.InvalidParameterException; 4 import java.util.Collection; 4 5 import java.util.LinkedList; 5 6 import java.util.List; … … 62 63 } else { 63 64 model = (IStochasticProcess) dataObject; 64 List<List<ReplayableEvent<?>>> sequences = new LinkedList<List<ReplayableEvent<?>>>();65 Collection<List<ReplayableEvent<?>>> sequences = new LinkedList<List<ReplayableEvent<?>>>(); 65 66 try { 66 67 for (int i = 0; i < numSessions; i++) { -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDgenerateReplayfile.java
r171 r203 2 2 3 3 import java.security.InvalidParameterException; 4 import java.util.Collection; 4 5 import java.util.List; 5 6 … … 41 42 } 42 43 43 List<List<ReplayableEvent<?>>> sequences = null;44 Collection<List<ReplayableEvent<?>>> sequences = null; 44 45 Object dataObject = GlobalDataContainer.getInstance().getData(sequencesName); 45 46 46 47 try { 47 sequences = ( List<List<ReplayableEvent<?>>>) dataObject;48 sequences = (Collection<List<ReplayableEvent<?>>>) dataObject; 48 49 ReplayGenerator generator = new ReplayGenerator(); 49 if( sequences!=null && sequences.size()>0 && sequences. get(0).get(0) instanceof Event ) {50 if( sequences!=null && sequences.size()>0 && sequences.iterator().next().get(0) instanceof Event ) { 50 51 generator.createLogfileMultipleSessions(sequences, filename); 51 52 } else { … … 53 54 if( sequencesName.equals("sequences") ) { 54 55 Console.traceln("Illegal use of \"sequences\" parameter in the GlobalDataContainer."); 55 Console.traceln("The parameter should always be of type List<List<Event>>!");56 Console.traceln("The parameter should always be of type Collection<List<Event>>!"); 56 57 } 57 58 } -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDsequenceStatistics.java
r171 r203 1 1 package de.ugoe.cs.eventbench.commands; 2 2 3 import java.util.Collection; 3 4 import java.util.List; 4 5 import java.util.Map.Entry; … … 35 36 } 36 37 37 List<List<Event<?>>> sequences = null;38 Collection<List<Event<?>>> sequences = null; 38 39 Object dataObject = GlobalDataContainer.getInstance().getData( 39 40 sequencesName); 40 41 41 42 try { 42 sequences = ( List<List<Event<?>>>) dataObject;43 sequences = (Collection<List<Event<?>>>) dataObject; 43 44 Console.traceln("Number of Sequences: " + sequences.size()); 44 45 SortedMap<Integer, Integer> lengthMap = new TreeMap<Integer, Integer>(); -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDshowSequences.java
r140 r203 2 2 3 3 import java.security.InvalidParameterException; 4 import java.util.Collection; 4 5 import java.util.List; 5 6 … … 22 23 throw new InvalidParameterException(); 23 24 24 List<List<Event<?>>> containedSequences = null;25 Collection<List<Event<?>>> containedSequences = null; 25 26 26 27 try { 27 containedSequences = ( List<List<Event<?>>>) GlobalDataContainer28 containedSequences = (Collection<List<Event<?>>>) GlobalDataContainer 28 29 .getInstance().getData("sequences"); 29 30 } catch (ClassCastException e) { -
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDupdateModel.java
r184 r203 2 2 3 3 import java.security.InvalidParameterException; 4 import java.util.Collection; 4 5 import java.util.List; 5 6 … … 38 39 } 39 40 40 List<List<Event<?>>> sequences = null;41 Collection<List<Event<?>>> sequences = null; 41 42 Object dataObject = GlobalDataContainer.getInstance().getData( 42 43 sequencesName); … … 47 48 } 48 49 try { 49 sequences = ( List<List<Event<?>>>) dataObject;50 sequences = (Collection<List<Event<?>>>) dataObject; 50 51 } catch (ClassCastException e) { 51 52 Console.println("Object " + sequencesName 52 + "not of type List<List<Event<?>>>.");53 + "not of type Collection<List<Event<?>>>."); 53 54 } 54 55 if (sequences.size() == 0 55 || !(sequences. get(0).get(0) instanceof Event)) {56 || !(sequences.iterator().next().get(0) instanceof Event)) { 56 57 Console.println("Object " + sequencesName 57 + "not of type List<List<Event<?>>>.");58 + "not of type Collection<List<Event<?>>>."); 58 59 return; 59 60 }
Note: See TracChangeset
for help on using the changeset viewer.