public class BuilderUtils extends Object
Constructor and Description |
---|
BuilderUtils() |
Modifier and Type | Method and Description |
---|---|
static <T> List<T> |
collapsedList()
Create a new (empty) collapsed model list.
|
static <T> List<T> |
collapsedList(Navigation.Builder navBuilder)
Create a new (empty) collapsed model list, with a navigation builder set.
|
static <K,V> Map<K,V> |
collapsedMap()
Create a new (empty) collapsed model map.
|
static <K,V> Map<K,V> |
collapsedMap(Navigation.Builder navBuilder)
Create a new (empty) collapsed model map, with a navigation builder set.
|
static <T> PageResponse<T> |
collapsedPageResponse(Navigation.Builder navBuilder) |
static <T> List<T> |
immutableListOrCollapsed(com.google.common.collect.ImmutableList.Builder<T> builder)
Deprecated.
since 5.8 Use a
ModelListBuilder . |
static <K,V> Map<K,V> |
modelMap(com.google.common.collect.ImmutableMap.Builder<? extends K,? extends V> mapBuilder)
Deprecated.
since 5.6 use
modelMap(ModelMapBuilder) |
static <K,V> Map<K,V> |
modelMap(Map<? extends K,? extends V> map)
All API Model maps must be Immutable and either:
|
static <K,V> Map<K,V> |
modelMap(ModelMapBuilder<? extends K,? extends V> mapBuilder)
All API Model maps must be Immutable and either:
|
static <T> com.google.common.collect.ImmutableList.Builder<T> |
safelyAddAllToBuilder(com.google.common.collect.ImmutableList.Builder<T> listBuilder,
Iterable<? extends T> toAdd)
Deprecated.
since 5.8 Use a
ModelListBuilder . |
static <K,V> com.google.common.collect.ImmutableMap.Builder<K,V> |
safelyPutAllToBuilder(com.google.common.collect.ImmutableMap.Builder<K,V> mapBuilder,
Map<? extends K,? extends V> toAdd)
Deprecated.
since 5.5.1 Use a
ModelMapBuilder . |
static <K,V> com.google.common.collect.ImmutableMap.Builder<K,V> |
safelyPutToBuilder(com.google.common.collect.ImmutableMap.Builder<K,V> mapBuilder,
K key,
V value)
Deprecated.
since 5.5.1 Use a
ModelMapBuilder . |
@Deprecated public static <T> List<T> immutableListOrCollapsed(com.google.common.collect.ImmutableList.Builder<T> builder)
ModelListBuilder
.public static <T> PageResponse<T> collapsedPageResponse(Navigation.Builder navBuilder)
public static <T> List<T> collapsedList()
(If you want to add entries to a list, see ModelListBuilder
.)
ModelListBuilder
public static <T> List<T> collapsedList(Navigation.Builder navBuilder)
(If you want to add entries to a list, see ModelListBuilder
.)
ModelListBuilder
public static <K,V> Map<K,V> collapsedMap()
(If you want to add entries to a map, see modelMap(Map)
or ModelMapBuilder
.)
ModelMapBuilder
public static <K,V> Map<K,V> collapsedMap(Navigation.Builder navBuilder)
(If you want to add entries to a map, see modelMap(Map)
or ModelMapBuilder
.)
ModelMapBuilder
public static <K,V> Map<K,V> modelMap(ModelMapBuilder<? extends K,? extends V> mapBuilder)
1. Collapsed if null, or 2. RestEnrichable
This method *must* be called when assigning to a model map from a map builder. It is guaranteed to create a correct map from any input.
ModelMapBuilder
@Deprecated public static <K,V> Map<K,V> modelMap(com.google.common.collect.ImmutableMap.Builder<? extends K,? extends V> mapBuilder)
modelMap(ModelMapBuilder)
public static <K,V> Map<K,V> modelMap(Map<? extends K,? extends V> map)
1. Collapsed if null, or 2. RestEnrichable
This method *must* be called when assigning to a model map. It is guaranteed to create a correct map from any input.
@Deprecated public static <K,V> com.google.common.collect.ImmutableMap.Builder<K,V> safelyPutToBuilder(com.google.common.collect.ImmutableMap.Builder<K,V> mapBuilder, K key, V value)
ModelMapBuilder
.@Deprecated public static <K,V> com.google.common.collect.ImmutableMap.Builder<K,V> safelyPutAllToBuilder(com.google.common.collect.ImmutableMap.Builder<K,V> mapBuilder, Map<? extends K,? extends V> toAdd)
ModelMapBuilder
.@Deprecated public static <T> com.google.common.collect.ImmutableList.Builder<T> safelyAddAllToBuilder(com.google.common.collect.ImmutableList.Builder<T> listBuilder, Iterable<? extends T> toAdd)
ModelListBuilder
.Copyright © 2003–2018 Atlassian. All rights reserved.