Ignore:
Timestamp:
09/28/11 03:03:13 (13 years ago)
Author:
sherbold
Message:
  • greatly improved type checking and consistency of type checking for objects checked out of the GlobalDataContainer?
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/EventBenchConsole/src/de/ugoe/cs/eventbench/commands/CMDcalcCoverage.java

    r171 r209  
    55import java.util.List; 
    66 
     7import de.ugoe.cs.eventbench.SequenceInstanceOf; 
    78import de.ugoe.cs.eventbench.coverage.CoverageCalculatorObserved; 
    89import de.ugoe.cs.eventbench.coverage.CoverageCalculatorProcess; 
     
    6869                        return; 
    6970                } 
    70                 if (!(dataObjectObserved instanceof Collection<?>)) { 
    71                         // weak instance check! 
    72                         Console.printerrln("Object " + observedName + " not a Collection!"); 
     71                if (!SequenceInstanceOf.isCollectionOfSequences(dataObjectObserved)) { 
     72                        Console.printerrln("Object " + observedName 
     73                                        + " of type Collection<List<Event<?>>>!"); 
    7374                        return; 
    7475                } 
     
    9899                                Console.println("Sequences " + sequenceName 
    99100                                                + " not found in storage."); 
    100                         } else if (!(dataObjectSequences instanceof Collection<?>)) { 
    101                                 // cannot really perform type check at runtime! this is an 
    102                                 // approximative substitute 
     101                                return; 
     102                        } else if (!SequenceInstanceOf 
     103                                        .isCollectionOfSequences(dataObjectSequences)) { 
    103104                                Console.printerrln("Object " + sequenceName 
    104                                                 + "not of type Collection<?>!"); 
     105                                                + "not of type Collection<List<Event<?>!"); 
    105106                                return; 
    106107                        } 
Note: See TracChangeset for help on using the changeset viewer.