Package com.wavemaker.commons.io
Class FilteredResources<T extends Resource>
- java.lang.Object
-
- com.wavemaker.commons.io.AbstractResources<T>
-
- com.wavemaker.commons.io.FilteredResources<T>
-
- All Implemented Interfaces:
Resources<T>,java.lang.Iterable<T>
public class FilteredResources<T extends Resource> extends AbstractResources<T>
Implementation of ofResourcesthat dynamically filters items based on aResourceFilter.- See Also:
#include(Resources, ResourceIncludeFilter)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T extends Resource>
Resources<T>exclude(Resources<T> resources, ResourceFilter... filters)FoldergetSource()Returns the source of the resources.static <T extends Resource>
Resources<T>include(Resources<T> resources, ResourceFilter... filters)java.util.Iterator<T>iterator()-
Methods inherited from class com.wavemaker.commons.io.AbstractResources
copyTo, delete, exclude, fetchAll, files, folders, getResourceFilterContext, include, moveTo, performOperation
-
-
-
-
Method Detail
-
getSource
public Folder getSource()
Description copied from interface:ResourcesReturns the source of the resources. Items in this collection will bemovedorcopiedrelative to the source. For example, if this object contains the files '/a/b/c.txt' and '/d/e/f.txt' and the source is '/d' copy to '/x/ will result in '/x/b/c.txt' and 'x/e/f.txt'.- Returns:
- the source for the resources
-
iterator
public java.util.Iterator<T> iterator()
-
include
public static <T extends Resource> Resources<T> include(Resources<T> resources, ResourceFilter... filters)
-
exclude
public static <T extends Resource> Resources<T> exclude(Resources<T> resources, ResourceFilter... filters)
-
-