/** * Returns a filter that ANDs the specified filters. * * @param filters the IOFileFilters that will be ANDed together. * @return a filter that ANDs the specified filters * * @throws IllegalArgumentException if the filters are null or contain a * null value. * @see AndFileFilter * @since 2.0 */ public static IOFileFilter and(final IOFileFilter... filters) { return new AndFileFilter(toList(filters)); }
/** * Returns a filter that ORs the specified filters. * * @param filters the IOFileFilters that will be ORed together. * @return a filter that ORs the specified filters * * @throws IllegalArgumentException if the filters are null or contain a * null value. * @see OrFileFilter * @since 2.0 */ public static IOFileFilter or(final IOFileFilter... filters) { return new OrFileFilter(toList(filters)); }
@Test public void testNullFilters() { try { FileFilterUtils.toList((IOFileFilter) null); fail("Expected IllegalArgumentException"); } catch (final IllegalArgumentException ignore) { // expected } try { FileFilterUtils.toList(new IOFileFilter[]{null}); fail("Expected IllegalArgumentException"); } catch (final IllegalArgumentException ignore) { // expected } }
/** * Returns a filter that ANDs the specified filters. * * @param filters the IOFileFilters that will be ANDed together. * @return a filter that ANDs the specified filters * * @throws IllegalArgumentException if the filters are null or contain a * null value. * @see AndFileFilter * @since 2.0 */ public static IOFileFilter and(final IOFileFilter... filters) { return new AndFileFilter(toList(filters)); }
/** * Returns a filter that ORs the specified filters. * * @param filters the IOFileFilters that will be ORed together. * @return a filter that ORs the specified filters * * @throws IllegalArgumentException if the filters are null or contain a * null value. * @see OrFileFilter * @since 2.0 */ public static IOFileFilter or(final IOFileFilter... filters) { return new OrFileFilter(toList(filters)); }
/** * Returns a filter that ORs the specified filters. * * @param filters the IOFileFilters that will be ORed together. * @return a filter that ORs the specified filters * * @throws IllegalArgumentException if the filters are null or contain a * null value. * @see OrFileFilter * @since 2.0 */ public static IOFileFilter or(final IOFileFilter... filters) { return new OrFileFilter(toList(filters)); }
/** * Returns a filter that ANDs the specified filters. * * @param filters the IOFileFilters that will be ANDed together. * @return a filter that ANDs the specified filters * * @throws IllegalArgumentException if the filters are null or contain a * null value. * @see AndFileFilter * @since 2.0 */ public static IOFileFilter and(final IOFileFilter... filters) { return new AndFileFilter(toList(filters)); }
/** * Returns a filter that ANDs the specified filters. * * @param filters the IOFileFilters that will be ANDed together. * @return a filter that ANDs the specified filters * * @throws IllegalArgumentException if the filters are null or contain a * null value. * @see AndFileFilter * @since 2.0 */ public static IOFileFilter and(IOFileFilter... filters) { return new AndFileFilter(toList(filters)); }
/** * Returns a filter that ANDs the specified filters. * * @param filters the IOFileFilters that will be ANDed together. * @return a filter that ANDs the specified filters * * @throws IllegalArgumentException if the filters are null or contain a * null value. * @see AndFileFilter * @since 2.0 */ public static IOFileFilter and(IOFileFilter... filters) { return new AndFileFilter(toList(filters)); }
/** * Returns a filter that ORs the specified filters. * * @param filters the IOFileFilters that will be ORed together. * @return a filter that ORs the specified filters * * @throws IllegalArgumentException if the filters are null or contain a * null value. * @see OrFileFilter * @since 2.0 */ public static IOFileFilter or(IOFileFilter... filters) { return new OrFileFilter(toList(filters)); }
/** * Returns a filter that ORs the specified filters. * * @param filters the IOFileFilters that will be ORed together. * @return a filter that ORs the specified filters * * @throws IllegalArgumentException if the filters are null or contain a * null value. * @see OrFileFilter * @since 2.0 */ public static IOFileFilter or(IOFileFilter... filters) { return new OrFileFilter(toList(filters)); }