Class ResourceFiles
java.lang.Object
org.springframework.aot.test.generator.file.ResourceFiles
- All Implemented Interfaces:
Iterable<ResourceFile>
An immutable collection of
ResourceFile instances.- Since:
- 6.0
- Author:
- Phillip Webb
-
Method Summary
Modifier and TypeMethodDescriptionand(Iterable<ResourceFile> resourceFiles) Return a newResourceFilesinstance that merges files from another iterable ofResourceFilesinstances.and(ResourceFile... resourceFiles) Return a newResourceFilesinstance that merges files from another array ofResourceFileinstances.and(ResourceFiles ResourceFiles) Return a newResourceFilesinstance that merges files from anotherResourceFilesinstance.booleanGet theResourceFilewith the givenDynamicFile#getPath() path.Return the single source file contained in the collection.inthashCode()booleanisEmpty()Returnstrueif this collection is empty.iterator()static ResourceFilesnone()Return aDynamicFilesinstance with no items.static ResourceFilesof(ResourceFile... ResourceFiles) Factory method that can be used to create aResourceFilesinstance containing the specified files.stream()Stream theResourceFileinstances contained in this collection.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
none
Return aDynamicFilesinstance with no items.- Returns:
- the empty instance
-
of
Factory method that can be used to create aResourceFilesinstance containing the specified files.- Parameters:
ResourceFiles- the files to include- Returns:
- a
ResourceFilesinstance
-
and
Return a newResourceFilesinstance that merges files from another array ofResourceFileinstances.- Parameters:
resourceFiles- the instances to merge- Returns:
- a new
ResourceFilesinstance containing merged content
-
and
Return a newResourceFilesinstance that merges files from another iterable ofResourceFilesinstances.- Parameters:
resourceFiles- the instances to merge- Returns:
- a new
ResourceFilesinstance containing merged content
-
and
Return a newResourceFilesinstance that merges files from anotherResourceFilesinstance.- Parameters:
ResourceFiles- the instance to merge- Returns:
- a new
ResourceFilesinstance containing merged content
-
iterator
- Specified by:
iteratorin interfaceIterable<ResourceFile>
-
stream
Stream theResourceFileinstances contained in this collection.- Returns:
- a stream of file instances
-
isEmpty
public boolean isEmpty()Returnstrueif this collection is empty.- Returns:
- if this collection is empty
-
get
Get theResourceFilewith the givenDynamicFile#getPath() path.- Parameters:
path- the path to find- Returns:
- a
ResourceFileinstance ornull
-
getSingle
Return the single source file contained in the collection.- Returns:
- the single file
- Throws:
IllegalStateException- if the collection doesn't contain exactly one file
-
equals
-
hashCode
public int hashCode() -
toString
-