Class ZipFileInputTree<T extends InputResource>
java.lang.Object
org.jdrupes.builder.core.ResourceObject
org.jdrupes.builder.core.ZipFileInputTree<T>
- Type Parameters:
T- the type of theInputResources in the tree.
public class ZipFileInputTree<T extends InputResource>
extends ResourceObject
implements InputTree<T>
The default implementation of a
ZipFileInputTree.-
Nested Class Summary
Nested classes/interfaces inherited from interface InputTree
InputTree.Entry<T> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedZipFileInputTree(ResourceType<?> type, ZipFile zipFile, String[] patterns) Returns a new file tree. -
Method Summary
Modifier and TypeMethodDescriptionAdds the given resource.asOf()The instant at which this resource was created or last modified.clear()Clears the contained resources.entries()Returns the paths of the files in this file tree relative to its root.Add a ant-style path pattern to exclude from the tree.get()Returns the resources as aSequencedSet.booleanisEmpty()Checks if is empty.paths()Returns the relative paths of the entries in this tree.stream()Retrieves the resources as a stream.Methods inherited from interface Resource
asOfLocalized, cleanup, isNewerThan, name, type
-
Constructor Details
-
ZipFileInputTree
Returns a new file tree. The file tree includes all files matchingpatternin the tree provided by the zip file.- Parameters:
type- the resource typezipFile- the ZIP filepatterns- the patterns
-
-
Method Details
-
clear
-
add
-
isEmpty
Description copied from interface:ResourcesChecks if is empty. The default implementation returnsget().isEmpty(). Implementing classes should provide a more efficient implementation.- Specified by:
isEmptyin interfaceResources<T extends InputResource>- Returns:
- true, if is empty
-
exclude
Description copied from interface:InputTreeAdd a ant-style path pattern to exclude from the tree.- Specified by:
excludein interfaceInputTree<T extends InputResource>- Parameters:
pattern- the pattern- Returns:
- the file tree
-
asOf
-
entries
Description copied from interface:InputTreeReturns the paths of the files in this file tree relative to its root.- Specified by:
entriesin interfaceInputTree<T extends InputResource>- Returns:
- the stream
-
paths
-
stream
-
get
Description copied from interface:ResourcesReturns the resources as aSequencedSet.- Specified by:
getin interfaceResources<T extends InputResource>- Returns:
- the sequenced set
-