@Test public void testBothAccept() { when(delegate1.accept(file)).thenReturn(true); assertTrue(orFileFilter.accept(file)); verify(delegate1).accept(file); verify(delegate2, never()).accept(file); }
@Override public boolean accept(File pathname) { for (FileFilter delegate : delegates) { if (delegate.accept(pathname)) { return true; } } return false; }
OrFileFilter implements ParcelableFileFilter { @Override public boolean accept(File pathname) { for (FileFilter delegate : delegates) { if (delegate.accept(pathname)) { return true; } } return false; } }
OrFileFilter implements ParcelableFileFilter { @Override public boolean accept(File pathname) { for (FileFilter delegate : delegates) { if (delegate.accept(pathname)) { return true; } } return false; } OrFileFilter(ParcelableFileFilter... delegates); }
OrFileFilter implements ParcelableFileFilter { @Override public boolean accept(File pathname) { for (FileFilter delegate : delegates) { if (delegate.accept(pathname)) { return true; } } return false; } OrFileFilter(ParcelableFileFilter... delegates); @Override boolean accept(File pathname); @Override int describeContents(); @Override void writeToParcel(Parcel dest, int flags); }
OrFileFilter implements ParcelableFileFilter { @Override public boolean accept(File pathname) { for (FileFilter delegate : delegates) { if (delegate.accept(pathname)) { return true; } } return false; } OrFileFilter(ParcelableFileFilter... delegates); @Override boolean accept(File pathname); @Override int describeContents(); @Override void writeToParcel(Parcel dest, int flags); static final Creator<OrFileFilter> CREATOR; }