FilePairApriori { public boolean fits(FilterByApriori aprioriFilter) { return hasMinMaxConfidence(aprioriFilter.getMinConfidence(), aprioriFilter.getMaxConfidence()) && hasMinMaxSupport(aprioriFilter.getMinSupport(), aprioriFilter.getMaxSupport()) && hasMinMaxIssues(aprioriFilter.getMinIssues(), aprioriFilter.getMaxIssues()); } FilePairApriori(long fileIssues, long file2Issues, long filePairIssues, long allIssues); long getFileIssues(); long getFile2Issues(); long getIssues(); long getAllIssues(); double getSupportFile(); double getSupportFile2(); double getSupportFilePair(); double getConfidence(); double getConfidence2(); double getLift(); double getConviction(); double getConviction2(); boolean isFile2GreaterConfidence(); double getHighestConfidence(); boolean hasMinIssues(int minIssues); boolean hasIssues(int issues); boolean hasMaxIssues(int maxIssues); boolean hasMinSupport(Double minSupport); boolean hasMaxSupport(Double maxSupport); boolean hasMinConfidence(Double minConfidence); boolean hasMaxConfidence(Double maxConfidence); boolean fits(FilterByApriori aprioriFilter); boolean hasMinMaxConfidence(Double minConfidence, Double maxConfidence); boolean hasMinMaxSupport(Double minSupport, Double maxSupport); boolean hasMinMaxIssues(Integer minIssues, Integer maxIssues); @Override String toString(); String toStringPairFileApriori(); static String getToStringHeader(); static String getToStringHeaderPairFileApriori();  }
@Test public void testFitsFilter() { FilePairApriori apriori1 = new FilePairApriori(2, 4, 2, 4); Assert.assertTrue(apriori1.fits(new FilterByApriori(null, null, null, null, 2, 2))); Assert.assertTrue(apriori1.fits(new FilterByApriori(null, null, null, null, 2, 3))); Assert.assertFalse(apriori1.fits(new FilterByApriori(null, null, null, null, 1, 1))); Assert.assertFalse(apriori1.fits(new FilterByApriori(null, null, null, null, 3, 4))); Assert.assertTrue(apriori1.fits(new FilterByApriori(null, null, 0.5, null, 2, 2))); Assert.assertTrue(apriori1.fits(new FilterByApriori(null, null, 0.9, null, 2, 3))); Assert.assertTrue(apriori1.fits(new FilterByApriori(null, null, 1.0, null, 2, 3))); Assert.assertFalse(apriori1.fits(new FilterByApriori(null, null, 0.5, 0.7, 1, 1))); Assert.assertFalse(apriori1.fits(new FilterByApriori(null, null, 0.7, 0.9, 3, 4))); }