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 a
NOTE: All active collections are immutable, and will throw an
PlexusContainer
instance, which retrieves a fresh
batch of component elements for each method call. This interface DOES NOT implement Collection
,
since it is used as a common parent for active List
, Set
, and Map
implementations.
NOTE: All active collections are immutable, and will throw an
UnsupportedOperationException
if a mutator method is called.-
Method Summary
Modifier and TypeMethodDescriptionboolean
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
Same semantics asCollection.size()
orMap.size()
, except this method will throw aComponentLookupException
if one or more of the elements collected here fails during lookup.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 Details
-
getRole
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.ComponentLookupExceptionSame 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.ComponentLookupExceptionSame 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
-