Schnittstelle NamedDomainObjectSet<T>
- Typparameter:
T- The type of objects in the set
- Alle Superschnittstellen:
Collection<T>,DomainObjectCollection<T>,DomainObjectSet<T>,Iterable<T>,NamedDomainObjectCollection<T>,Set<T>
- Alle bekannten Unterschnittstellen:
ArtifactTransformReports,ArtifactTypeContainer,AuthenticationContainer,BuildDashboardReports,BuildTypeContainer,CheckstyleReports,CodeNarcReports,ConfigurationContainer,ConfigurationReports,DependencyReportContainer,DistributionContainer,ExtensiblePolymorphicDomainObjectContainer<T>,FlavorContainer,IvyConfigurationContainer,JacocoReportsContainer,MutableVersionCatalogContainer,NamedDomainObjectContainer<T>,NativeToolChainRegistry,PlatformContainer,PmdReports,PolymorphicDomainObjectContainer<T>,PrebuiltLibraries,PublicationContainer,ReportContainer<T>,Repositories,SoftwareComponentContainer,SourceSetContainer,TaskCollection<T>,TaskContainer,TestTaskReports
A specialization of NamedDomainObjectCollection that also implements Set and orders objects by their inherent name.
All object equality is determined in terms of object names. That is, calling remove() with an object that is NOT equal to
an existing object in terms of equals, but IS in terms of name equality will result in the existing collection item with
the equal name being removed.
You can create an instance of this type using the factory method ObjectFactory.namedDomainObjectSet(Class).
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungReturns a collection which contains the objects in this collection which meet the given closure specification.Returns a collection which contains the objects in this collection which meet the given closure specification.Returns a collection which contains the objects in this collection which meet the given specification.Returns a collection containing the objects with names matching the provided filter.<S extends T>
NamedDomainObjectSet<S> Returns a collection containing the objects in this collection of the given type.Von Schnittstelle geerbte Methoden java.util.Collection
parallelStream, removeIf, stream, toArrayVon Schnittstelle geerbte Methoden org.gradle.api.DomainObjectCollection
addAllLater, addLater, all, all, configureEach, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withType
-
Methodendetails
-
withType
Returns a collection containing the objects in this collection of the given type. The returned collection is live, so that when matching objects are later added to this collection, they are also visible in the filtered collection.This method is an intermediate operation. It does not change the realized/unrealized state of the elements in the collection.
- Angegeben von:
withTypein SchnittstelleDomainObjectCollection<T>- Angegeben von:
withTypein SchnittstelleDomainObjectSet<T>- Angegeben von:
withTypein SchnittstelleNamedDomainObjectCollection<T>- Parameter:
type- The type of objects to find.- Gibt zurück:
- The matching objects. Returns an empty collection if there are no such objects in this collection.
-
named
Returns a collection containing the objects with names matching the provided filter. The returned collection is live, so that when matching objects are added to this collection, they are also visible in the filtered collection.This method is an intermediate operation. It does not change the realized/unrealized state of the elements in the collection.
- Angegeben von:
namedin SchnittstelleNamedDomainObjectCollection<T>- Parameter:
nameFilter- The specification to test names against.- Gibt zurück:
- The collection of objects with names satisfying the filter. Returns an empty collection if there are no such objects in this collection.
-
matching
Returns a collection which contains the objects in this collection which meet the given specification. The returned collection is live, so that when matching objects are added to this collection, they are also visible in the filtered collection.This method is an intermediate eager operation. The application of the filter forces the realization of the collection elements.
- Angegeben von:
matchingin SchnittstelleDomainObjectCollection<T>- Angegeben von:
matchingin SchnittstelleDomainObjectSet<T>- Angegeben von:
matchingin SchnittstelleNamedDomainObjectCollection<T>- Parameter:
spec- The specification to use.- Gibt zurück:
- The collection of matching objects. Returns an empty collection if there are no such objects in this collection.
-
matching
Returns a collection which contains the objects in this collection which meet the given closure specification. The returned collection is live, so that when matching objects are added to this collection, they are also visible in the filtered collection.This method is an intermediate eager operation. The application of the filter forces the realization of the collection elements.
- Angegeben von:
matchingin SchnittstelleDomainObjectCollection<T>- Angegeben von:
matchingin SchnittstelleDomainObjectSet<T>- Angegeben von:
matchingin SchnittstelleNamedDomainObjectCollection<T>- Parameter:
spec- The specification to use. The closure gets a collection element as an argument.- Gibt zurück:
- The collection of matching objects. Returns an empty collection if there are no such objects in this collection.
-
findAll
Returns a collection which contains the objects in this collection which meet the given closure specification.This method is an eager operation. The application of the filter forces the realization of all of the underlying collection elements.
- Angegeben von:
findAllin SchnittstelleDomainObjectCollection<T>- Angegeben von:
findAllin SchnittstelleDomainObjectSet<T>- Parameter:
spec- The specification to use. The closure gets a collection element as an argument.- Gibt zurück:
- The collection of matching objects. Returns an empty collection if there are no such objects in this collection.
-