Class ModelMapBuilder<K,V>
- java.lang.Object
-
- com.atlassian.confluence.api.model.reference.ModelMapBuilder<K,V>
-
public class ModelMapBuilder<K,V> extends Object
A Map builder forCollapsedMap
andEnrichableMap
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.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ModelMapBuilder<K,V>
addCollapsedEntries(Iterable<? extends K> collapsedEntries)
ModelMapBuilder<K,V>
addCollapsedEntries(Set<? extends K> collapsedEntries)
Deprecated.since 5.10 Call addCollapsedEntries(Iterable) insteadModelMapBuilder<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.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)
-
-
-
Method Detail
-
newInstance
public static <K,V> ModelMapBuilder<K,V> newInstance()
-
newInstance
public static <K,V> ModelMapBuilder<K,V> newInstance(Map<? extends K,? extends V> map)
-
newExpandedInstance
public static <K,V> ModelMapBuilder<K,V> newExpandedInstance()
-
put
public ModelMapBuilder<K,V> put(K key, V value)
-
addCollapsedEntry
public ModelMapBuilder<K,V> addCollapsedEntry(K key)
-
addCollapsedEntries
@Deprecated public ModelMapBuilder<K,V> addCollapsedEntries(Set<? extends K> collapsedEntries)
Deprecated.since 5.10 Call addCollapsedEntries(Iterable) instead
-
addCollapsedEntries
public ModelMapBuilder<K,V> addCollapsedEntries(Iterable<? extends K> collapsedEntries)
-
copy
public ModelMapBuilder<K,V> copy(@NonNull Map<? extends K,? extends V> map)
Store CollapsedMap/NavMap but store values of other maps, including Enrichables.Replaces any existing contents in this builder with the contents of the map
-
navigable
public ModelMapBuilder<K,V> navigable(Navigation.Builder navBuilder)
-
build
public Map<K,V> build()
Build the map. If an expanded map method has been called last on the builder, an EnrichableMap will be returned. If not, a collapsed map will be built.
-
buildDelegate
@Deprecated protected com.google.common.collect.ImmutableMap<K,V> buildDelegate()
Deprecated.since 7.0.1. UsebuildFromDelegate()
-
-