public synchronized Iterable < Evidence > getIterator ( EvidenceType type , Confidence confidence ) { if ( null != confidence && null != type ) { final Set < Evidence > list ; switch ( type ) { case VENDOR : list = Collections . unmodifiableSet ( new HashSet <> ( vendors ) ) ; break ; case PRODUCT : list = Collections . unmodifiableSet ( new HashSet <> ( products ) ) ; break ; case VERSION : list = Collections . unmodifiableSet ( new HashSet <> ( versions ) ) ; break ; default : return null ; } switch ( confidence ) { case HIGHEST : return EvidenceCollection . HIGHEST_CONFIDENCE . filter ( list ) ; case HIGH : return EvidenceCollection . HIGH_CONFIDENCE . filter ( list ) ; case MEDIUM : return EvidenceCollection . MEDIUM_CONFIDENCE . filter ( list ) ; default : return EvidenceCollection . LOW_CONFIDENCE . filter ( list ) ; } } return null ; }
Used to iterate over evidence of the specified type and confidence .