Clarify that Multibinder elements need not be distinct if permitDuplicates() is specified.

PiperOrigin-RevId: 517978849
This commit is contained in:
Guice Team
2023-03-20 08:43:58 -07:00
committed by Guice Team
parent f26a731e3d
commit 06e8bb1ea1
@@ -72,8 +72,9 @@ import java.util.Set;
* <p>Annotations are used to create different sets of the same element type. Each distinct
* annotation gets its own independent collection of elements.
*
* <p><strong>Elements must be distinct.</strong> If multiple bound elements have the same value,
* set injection will fail.
* <p><strong>Elements must be distinct</strong> unless {@code permitDuplicates()} is specified.
* Without {@code permitDuplicates()}, set injection will fail if multiple bound elements have the
* same value.
*
* <p><strong>Elements must be non-null.</strong> If any set element is null, set injection will
* fail.