Resource directories presented as a single overlayed Resource directory.
This class differs from a List<Resource>, as a relative path can resolve
to only a single Resource in a CombinedResource, whilst it may resolve to multiple in a
List<Resource>.
| Access | Constructor and Description |
|---|---|
| pack-priv | CombinedResource(List<Resource>
the resources to be added to collection resources)Instantiates a new resource collection. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static Resource | Returns: A Resource of multiple resources or a single resource if only 1 is passed, or null if none are passed. Any Resource returned will always returntrue from Resource#isDirectory()multiple directory resources to combine as a single resource. Order is significant. resources)Make a Resource containing a combination of multiple directory resources. |
| public boolean | contains(Resource
the resource other)Overrides org. Return true if this resource deeply contains the other Resource. |
| public void | copyTo(Path
the destination file to create or directory to use. destination)Overrides org. Copy the Resource to the new destination file or directory |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. Indicates whether some other object is "equal to" this one. |
| public boolean | exists()
Overrides org. Equivalent to |
| pack-priv static List | |
| public String | getFileName()
Implements abstract org. The file name of the resource. |
| public String | getName()
Implements abstract org. The full name of the resource. |
| public Path | getPath()
Implements abstract org. Return the Path corresponding to this resource. |
| public Path | getPathTo(Resource
The other resource that may be contained in this resource other)Overrides org. Get the relative path from this Resource to a possibly contained resource. |
| public List | |
| public URI | getURI()
Implements abstract org. URI representing the resource. |
| public int | |
| public boolean | isDirectory()
Implements abstract org. Return true if resource represents a directory of potential resources. |
| public boolean | isReadable()
Implements abstract org. True if the resource is readable. |
| public Iterator | iterator()
Overrides org. Implements java. Return an Iterator of all Resource's referenced in this Resource. |
| public Instant | lastModified()
Overrides org. The time the resource was last modified. |
| public long | |
| public List | list()
Overrides org. List of contents of a directory |
| public Resource | Returns: The resulting resource :
The path segment to resolve subUriPath)Implements abstract org. Resolves a path against the resource collection. |
| public String | Returns: the list of resourcesOverrides java. Returns a string representation of the object. |
| _resources | back to summary |
|---|---|
| private final List<Resource> _resources | |
| CombinedResource | back to summary |
|---|---|
| pack-priv CombinedResource(List<Resource> resources) Instantiates a new resource collection. | |
| combine | back to summary |
|---|---|
| pack-priv static Resource combine(List<Resource> resources) Make a Resource containing a combination of multiple directory resources.
| |
| contains | back to summary |
|---|---|
| public boolean contains(Resource other) Overrides org. Doc from org. Return true if this resource deeply contains the other Resource. This resource must be a directory or a jar file or any form of resource capable of containing other resources. | |
| copyTo | back to summary |
|---|---|
| public void copyTo(Path destination) throws IOException Overrides org. Doc from org. Copy the Resource to the new destination file or directory
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| exists | back to summary |
|---|---|
| public boolean exists() Overrides org. Doc from org. Equivalent to
| |
| gatherUniqueFlatResourceList | back to summary |
|---|---|
| pack-priv static List | |
| getFileName | back to summary |
|---|---|
| public String getFileName() Implements abstract org. Doc from org. The file name of the resource. This is the last segment of the path. | |
| getName | back to summary |
|---|---|
| public String getName() Implements abstract org. Doc from org. The full name of the resource. | |
| getPath | back to summary |
|---|---|
| public Path getPath() Implements abstract org. Doc from org. Return the Path corresponding to this resource. | |
| getPathTo | back to summary |
|---|---|
| public Path getPathTo(Resource other) Overrides org. Doc from org. Get the relative path from this Resource to a possibly contained resource. | |
| getResources | back to summary |
|---|---|
| public List Retrieves the resource collection's resources. | |
| getURI | back to summary |
|---|---|
| public URI getURI() Implements abstract org. Doc from org. URI representing the resource. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isDirectory | back to summary |
|---|---|
| public boolean isDirectory() Implements abstract org. Doc from org. Return true if resource represents a directory of potential resources.
| |
| isReadable | back to summary |
|---|---|
| public boolean isReadable() Implements abstract org. Doc from org. True if the resource is readable.
| |
| iterator | back to summary |
|---|---|
| public Iterator Overrides org. Implements java. Doc from org. Return an Iterator of all Resource's referenced in this Resource. This is meaningful if you have a | |
| lastModified | back to summary |
|---|---|
| public Instant lastModified() Overrides org. Doc from org. The time the resource was last modified.
| |
| length | back to summary |
|---|---|
| public long length() Overrides org. Doc from org. Length of the resource.
| |
| list | back to summary |
|---|---|
| public List Overrides org. Doc from org. List of contents of a directory Ordering is | |
| resolve | back to summary |
|---|---|
| public Resource resolve(String subUriPath) Implements abstract org. Resolves a path against the resource collection.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |