@Test public void testSingleExclude() { final Set<AggregationInterval> includes = Collections.emptySet(); final Set<AggregationInterval> excludes = ImmutableSet.of(AggregationInterval.FIVE_MINUTE); assertTrue(IncludeExcludeUtils.included(AggregationInterval.MINUTE, includes, excludes)); assertFalse( IncludeExcludeUtils.included(AggregationInterval.FIVE_MINUTE, includes, excludes)); assertTrue(IncludeExcludeUtils.included(AggregationInterval.HOUR, includes, excludes)); assertTrue(IncludeExcludeUtils.included(AggregationInterval.DAY, includes, excludes)); assertTrue(IncludeExcludeUtils.included(AggregationInterval.WEEK, includes, excludes)); assertTrue(IncludeExcludeUtils.included(AggregationInterval.MONTH, includes, excludes)); assertTrue( IncludeExcludeUtils.included( AggregationInterval.ACADEMIC_TERM, includes, excludes)); assertTrue( IncludeExcludeUtils.included( AggregationInterval.CALENDAR_QUARTER, includes, excludes)); assertTrue(IncludeExcludeUtils.included(AggregationInterval.YEAR, includes, excludes)); }
public static <T> boolean included( T value, Collection<? extends T> includes, Collection<? extends T> excludes) { return (includes.isEmpty() && excludes.isEmpty()) || includes.contains(value) || (includes.isEmpty() && !excludes.contains(value)); }
IncludeExcludeUtils { public static <T> boolean included( T value, Collection<? extends T> includes, Collection<? extends T> excludes) { return (includes.isEmpty() && excludes.isEmpty()) || includes.contains(value) || (includes.isEmpty() && !excludes.contains(value)); } }
IncludeExcludeUtils { public static <T> boolean included( T value, Collection<? extends T> includes, Collection<? extends T> excludes) { return (includes.isEmpty() && excludes.isEmpty()) || includes.contains(value) || (includes.isEmpty() && !excludes.contains(value)); } private  IncludeExcludeUtils(); }
IncludeExcludeUtils { public static <T> boolean included( T value, Collection<? extends T> includes, Collection<? extends T> excludes) { return (includes.isEmpty() && excludes.isEmpty()) || includes.contains(value) || (includes.isEmpty() && !excludes.contains(value)); } private  IncludeExcludeUtils(); static boolean included(
            T value, Collection<? extends T> includes, Collection<? extends T> excludes); }
IncludeExcludeUtils { public static <T> boolean included( T value, Collection<? extends T> includes, Collection<? extends T> excludes) { return (includes.isEmpty() && excludes.isEmpty()) || includes.contains(value) || (includes.isEmpty() && !excludes.contains(value)); } private  IncludeExcludeUtils(); static boolean included(
            T value, Collection<? extends T> includes, Collection<? extends T> excludes);  }