@Test public void testContainsAny() throws Exception { final WhiteList whiteList = new WhiteList(); assertFalse( whiteList.containsAny( getSet() ) ); assertFalse( whiteList.containsAny( getSet( "org.test" ) ) ); whiteList.add( "org.something" ); assertFalse( whiteList.containsAny( getSet( "org.test" ) ) ); whiteList.add( "org.test" ); assertTrue( whiteList.containsAny( getSet( "org.test" ) ) ); }
public boolean containsAny( final Collection<String> packages ) { for ( String aPackage : packages ) { if ( contains( aPackage ) ) { return true; } } return false; }
WhiteList implements Set<String> { public boolean containsAny( final Collection<String> packages ) { for ( String aPackage : packages ) { if ( contains( aPackage ) ) { return true; } } return false; } }
WhiteList implements Set<String> { public boolean containsAny( final Collection<String> packages ) { for ( String aPackage : packages ) { if ( contains( aPackage ) ) { return true; } } return false; } WhiteList();  WhiteList( final Collection<String> packageNames ); }
WhiteList implements Set<String> { public boolean containsAny( final Collection<String> packages ) { for ( String aPackage : packages ) { if ( contains( aPackage ) ) { return true; } } return false; } WhiteList();  WhiteList( final Collection<String> packageNames ); @Override int size(); @Override boolean isEmpty(); @Override boolean contains( final Object o ); @Override Iterator<String> iterator(); @Override Object[] toArray(); @Override T[] toArray( final T[] ts ); @Override boolean add( final String s ); @Override boolean remove( final Object o ); @Override boolean containsAll( final Collection<?> collection ); @Override boolean addAll( final Collection<? extends String> collection ); @Override boolean retainAll( final Collection<?> collection ); @Override boolean removeAll( final Collection<?> collection ); @Override void clear(); boolean containsAny( final Collection<String> packages ); @Override int hashCode(); }
WhiteList implements Set<String> { public boolean containsAny( final Collection<String> packages ) { for ( String aPackage : packages ) { if ( contains( aPackage ) ) { return true; } } return false; } WhiteList();  WhiteList( final Collection<String> packageNames ); @Override int size(); @Override boolean isEmpty(); @Override boolean contains( final Object o ); @Override Iterator<String> iterator(); @Override Object[] toArray(); @Override T[] toArray( final T[] ts ); @Override boolean add( final String s ); @Override boolean remove( final Object o ); @Override boolean containsAll( final Collection<?> collection ); @Override boolean addAll( final Collection<? extends String> collection ); @Override boolean retainAll( final Collection<?> collection ); @Override boolean removeAll( final Collection<?> collection ); @Override void clear(); boolean containsAny( final Collection<String> packages ); @Override int hashCode();  }