- Timestamp:
- 09/09/11 06:23:36 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDmodelSize.java
r131 r171 1 /**2 *3 */4 1 package de.ugoe.cs.eventbench.commands; 5 2 … … 13 10 14 11 /** 15 * @author sherbold 16 * 12 * <p> 13 * Command that prints the size of a stochastic process to the console. 14 * </p> 15 * 16 * @author Steffen Herbold 17 * @version 1.0 17 18 */ 18 19 public class CMDmodelSize implements Command { 19 20 20 /* (non-Javadoc) 21 /* 22 * (non-Javadoc) 23 * 21 24 * @see de.ugoe.cs.util.console.Command#run(java.util.List) 22 25 */ … … 29 32 throw new InvalidParameterException(); 30 33 } 31 32 Object dataObject = GlobalDataContainer.getInstance().getData(modelname); 33 if( dataObject==null ) { 34 35 Object dataObject = GlobalDataContainer.getInstance() 36 .getData(modelname); 37 if (dataObject == null) { 34 38 Console.printerrln("No model with name " + modelname + "found"); 35 39 return; 36 40 } 37 if( !(dataObject instanceof IStochasticProcess) ) { 38 Console.printerrln("Object " + modelname + " not of type IStochasticProcess!"); 41 if (!(dataObject instanceof IStochasticProcess)) { 42 Console.printerrln("Object " + modelname 43 + " not of type IStochasticProcess!"); 39 44 return; 40 45 } 41 46 42 47 IStochasticProcess process = (IStochasticProcess) dataObject; 43 Console.println("#symbols: " + process.getNumSymbols() + " ; #FOMstates " + process.getNumFOMStates()); 48 Console.println("#symbols: " + process.getNumSymbols() 49 + " ; #FOMstates " + process.getNumFOMStates()); 44 50 } 45 51 46 /* (non-Javadoc) 52 /* 53 * (non-Javadoc) 54 * 47 55 * @see de.ugoe.cs.util.console.Command#help() 48 56 */
Note: See TracChangeset
for help on using the changeset viewer.