Class ResourceFiles
java.lang.Object
org.springframework.aot.test.generate.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 newResourceFiles
instance that merges files from another iterable ofResourceFiles
instances.and
(ResourceFile... resourceFiles) Return a newResourceFiles
instance that merges files from another array ofResourceFile
instances.and
(ResourceFiles ResourceFiles) Return a newResourceFiles
instance that merges files from anotherResourceFiles
instance.boolean
Get theResourceFile
with the given path.Return the singleResourceFile
contained in the collection.int
hashCode()
boolean
isEmpty()
Returnstrue
if this collection is empty.iterator()
static ResourceFiles
none()
Return aDynamicFiles
instance with no items.static ResourceFiles
of
(ResourceFile... ResourceFiles) Factory method that can be used to create aResourceFiles
instance containing the specified files.stream()
Stream theResourceFile
instances contained in this collection.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
none
Return aDynamicFiles
instance with no items.- Returns:
- the empty instance
-
of
Factory method that can be used to create aResourceFiles
instance containing the specified files.- Parameters:
ResourceFiles
- the files to include- Returns:
- a
ResourceFiles
instance
-
and
Return a newResourceFiles
instance that merges files from another array ofResourceFile
instances.- Parameters:
resourceFiles
- the instances to merge- Returns:
- a new
ResourceFiles
instance containing merged content
-
and
Return a newResourceFiles
instance that merges files from another iterable ofResourceFiles
instances.- Parameters:
resourceFiles
- the instances to merge- Returns:
- a new
ResourceFiles
instance containing merged content
-
and
Return a newResourceFiles
instance that merges files from anotherResourceFiles
instance.- Parameters:
ResourceFiles
- the instance to merge- Returns:
- a new
ResourceFiles
instance containing merged content
-
iterator
- Specified by:
iterator
in interfaceIterable<ResourceFile>
-
stream
Stream theResourceFile
instances contained in this collection.- Returns:
- a stream of file instances
-
isEmpty
public boolean isEmpty()Returnstrue
if this collection is empty.- Returns:
- if this collection is empty
-
get
Get theResourceFile
with the given path.- Parameters:
path
- the path to find- Returns:
- a
ResourceFile
instance ornull
-
getSingle
Return the singleResourceFile
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
-