Class MapFiller.SimpleMapFiller<K,V>
java.lang.Object
ru.progrm_jarvis.javacommons.collection.MapFiller.SimpleMapFiller<K,V>
- Type Parameters:
K- type of map's keyV- type of map's value
- All Implemented Interfaces:
MapFiller<K,V>
An utility-object to fill the map following the chain pattern which may useful when initializing class fields.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ru.progrm_jarvis.javacommons.collection.MapFiller
MapFiller.SimpleMapFiller<K,V> -
Method Summary
Modifier and TypeMethodDescriptionFills the map with the values of specifiedIterable.Fills the map based on the specifiedIterator.Fills the map based on the specifiedStream.Fills the map with the values of specified array.fillOrdered(@NonNull Stream<@NotNull ? extends Pair<K, V>> entries) Fills the map based on the specifiedStreamkeeping order.map()Gets the filled map.Puts the specified value by the specified key to the map.toString()
-
Method Details
-
put
Puts the specified value by the specified key to the map. -
fill
@SafeVarargs @NotNull public final @NotNull MapFiller<K,V> fill(@NotNull @NotNull Pair<K, V> @NonNull ... entries) Fills the map with the values of specified array. -
fill
@NotNull public final @NotNull MapFiller<K,V> fill(@NonNull @NonNull Iterator<@NotNull ? extends Pair<K, V>> entries) Fills the map based on the specifiedIterator. -
fill
@NotNull public final @NotNull MapFiller<K,V> fill(@NonNull @NonNull Iterable<@NotNull ? extends Pair<K, V>> entries) Fills the map with the values of specifiedIterable. -
fill
@NotNull public final @NotNull MapFiller<K,V> fill(@NonNull @NonNull Stream<@NotNull ? extends Pair<K, V>> entries) Fills the map based on the specifiedStream. -
fillOrdered
@NotNull public final @NotNull MapFiller<K,V> fillOrdered(@NonNull @NonNull Stream<@NotNull ? extends Pair<K, V>> entries) Description copied from interface:MapFillerFills the map based on the specifiedStreamkeeping order.- Specified by:
fillOrderedin interfaceMapFiller<K,V> - Parameters:
entries- stream of the entries whose elements will be put to the map- Returns:
- this map filler for chaining
-
toString
-
map
Description copied from interface:MapFillerGets the filled map.
-