Module dagger

Class SetBuilder<T>


  • public final class SetBuilder<T>
    extends java.lang.Object
    A fluent builder class that returns a Set. Used in component implementations where a set must be created in one fluent statement for inlined request fulfillments.
    • Method Detail

      • newSetBuilder

        public static <T> SetBuilder<T> newSetBuilder​(int estimatedSize)
        estimatedSize is the number of bindings which contribute to the set. They may each provide [0..n) instances to the set. Because the final size is unknown, contributions are collected in a list and only hashed in build().
      • addAll

        public SetBuilder<T> addAll​(java.util.Collection<? extends T> collection)
      • build

        public java.util.Set<T> build()