Package org.codehaus.plexus.collections
Interface ActiveCollection
-
- All Known Subinterfaces:
ActiveList
,ActiveMap
,ActiveSet
- All Known Implementing Classes:
AbstractActiveList
,AbstractActiveMap
,AbstractActiveSet
,DefaultActiveList
,DefaultActiveMap
,DefaultActiveSet
public interface ActiveCollection
Represents a collection-style view of aPlexusContainer
instance, which retrieves a fresh batch of component elements for each method call. This interface DOES NOT implementCollection
, since it is used as a common parent for activeList
,Set
, andMap
implementations.
NOTE: All active collections are immutable, and will throw anUnsupportedOperationException
if a mutator method is called.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
checkedIsEmpty()
Same semantics asCollection.isEmpty()
orMap.isEmpty()
, except this method will throw aComponentLookupException
if one or more of the elements collected here fails during lookup.int
checkedSize()
Same semantics asCollection.size()
orMap.size()
, except this method will throw aComponentLookupException
if one or more of the elements collected here fails during lookup.java.lang.String
getRole()
Retrive the role, or type of component, which is collected in the current instance.boolean
isEmpty()
Same semantics asCollection.isEmpty()
orMap.isEmpty()
.int
size()
Same semantics asCollection.size()
orMap.size()
.
-
-
-
Method Detail
-
getRole
java.lang.String getRole()
Retrive the role, or type of component, which is collected in the current instance. The current collection will only "contain" elements that specify this role in their component definitions.
-
isEmpty
boolean isEmpty()
Same semantics asCollection.isEmpty()
orMap.isEmpty()
.
-
checkedIsEmpty
boolean checkedIsEmpty() throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
Same semantics asCollection.isEmpty()
orMap.isEmpty()
, except this method will throw aComponentLookupException
if one or more of the elements collected here fails during lookup.- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
-
size
int size()
Same semantics asCollection.size()
orMap.size()
.
-
checkedSize
int checkedSize() throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
Same semantics asCollection.size()
orMap.size()
, except this method will throw aComponentLookupException
if one or more of the elements collected here fails during lookup.- Throws:
org.codehaus.plexus.component.repository.exception.ComponentLookupException
-
-