Interface References<R>
- Type Parameters:
R
- the contextual reference type
- All Superinterfaces:
Iterable<R>
,ReferencesSelector
An
Iterable
providing access to contextual references of a given type, and a ReferencesSelector
providing access to a References
of a different type.- Author:
- Laird Nelson
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault R
get()
A convenience method that acquires and returns what is presumed, possibly incorrectly, to be the sole contextual reference available from thisReferences
.int
size()
Returns the size of thisReferences
.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface org.microbean.bean.ReferencesSelector
destroy, reference, references
-
Method Details
-
get
A convenience method that acquires and returns what is presumed, possibly incorrectly, to be the sole contextual reference available from thisReferences
.- Returns:
- a contextual reference; never
null
- Throws:
UnsatisfiedReductionException
- if there are no contextual references to returnAmbiguousReductionException
- if there is more than one contextual reference to return
-
size
int size()Returns the size of thisReferences
.- Returns:
- the size of this
References
(a positive integer)
-