Class ImmutableValueMap.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • put

        @NotNull
        public @NotNull ImmutableValueMap.Builder put​(@NotNull
                                                      @NotNull String key,
                                                      @NotNull
                                                      @NotNull Object value)
        Associates key with value in the built map. Duplicate keys are not allowed, and will cause build() to fail.
        Parameters:
        key - Key
        value - value
        Returns:
        this
      • put

        @NotNull
        public @NotNull ImmutableValueMap.Builder put​(@NotNull
                                                      @NotNull Map.Entry<String,​Object> entry)
        Adds the given entry to the map, making it immutable if necessary. Duplicate keys are not allowed, and will cause build() to fail.
        Parameters:
        entry - Entry
        Returns:
        this
      • putAll

        @NotNull
        public @NotNull ImmutableValueMap.Builder putAll​(@NotNull
                                                         @NotNull Map<String,​Object> value)
        Associates all of the given map's keys and values in the built map. Duplicate keys are not allowed, and will cause build() to fail.
        Parameters:
        value - Value
        Returns:
        this
        Throws:
        NullPointerException - if any key or value in map is null