public class ModelMapBuilder<K,V> extends Object
CollapsedMap
and EnrichableMap
instances.
The map built will be Collapsed unless put or addCollapsed methods are called. This class should be suitable for all Map usage in model Factories and Builders.
Modifier and Type | Method and Description |
---|---|
ModelMapBuilder<K,V> |
addCollapsedEntries(Iterable<? extends K> collapsedEntries) |
ModelMapBuilder<K,V> |
addCollapsedEntries(Set<? extends K> collapsedEntries)
Deprecated.
since 5.10 Call addCollapsedEntries(Iterable) instead
|
ModelMapBuilder<K,V> |
addCollapsedEntry(K key) |
Map<K,V> |
build()
Build the map.
|
protected com.google.common.collect.ImmutableMap<K,V> |
buildDelegate()
Deprecated.
since 7.0.1. Use
buildFromDelegate() |
protected Map<K,V> |
buildFromDelegate() |
ModelMapBuilder<K,V> |
copy(@NonNull Map<? extends K,? extends V> map)
Store CollapsedMap/NavMap but store values of other maps, including Enrichables.
|
ModelMapBuilder<K,V> |
navigable(Navigation.Builder navBuilder) |
static <K,V> ModelMapBuilder<K,V> |
newExpandedInstance() |
static <K,V> ModelMapBuilder<K,V> |
newInstance() |
static <K,V> ModelMapBuilder<K,V> |
newInstance(Map<? extends K,? extends V> map) |
ModelMapBuilder<K,V> |
put(K key,
V value) |
ModelMapBuilder<K,V> |
putAll(Map<? extends K,? extends V> map) |
public static <K,V> ModelMapBuilder<K,V> newInstance()
public static <K,V> ModelMapBuilder<K,V> newInstance(Map<? extends K,? extends V> map)
public static <K,V> ModelMapBuilder<K,V> newExpandedInstance()
public ModelMapBuilder<K,V> put(K key, V value)
public ModelMapBuilder<K,V> addCollapsedEntry(K key)
@Deprecated public ModelMapBuilder<K,V> addCollapsedEntries(Set<? extends K> collapsedEntries)
public ModelMapBuilder<K,V> addCollapsedEntries(Iterable<? extends K> collapsedEntries)
public ModelMapBuilder<K,V> copy(@NonNull Map<? extends K,? extends V> map)
Replaces any existing contents in this builder with the contents of the map
public ModelMapBuilder<K,V> navigable(Navigation.Builder navBuilder)
public Map<K,V> build()
@Deprecated protected com.google.common.collect.ImmutableMap<K,V> buildDelegate()
buildFromDelegate()
Copyright © 2003–2019 Atlassian. All rights reserved.