Modifier and Type | Class and Description |
---|---|
static interface |
Maps.IMapBuilder<K,V>
Map builder.
|
Modifier and Type | Method and Description |
---|---|
static <K,V> Maps.IMapBuilder<K,V> |
builder()
Returns a new map builder.
|
static <K,V> Map.Entry<K,V> |
entryOf(K key,
V value)
Returns a new map entry of the given key-value pair.
|
static <K,V> Map<K,V> |
of(K k1,
V v1)
Returns an immutable map with one mapping.
|
static <K,V> Map<K,V> |
of(K k1,
V v1,
K k2,
V v2)
Returns an immutable map with two mappings.
|
static <K,V> Map<K,V> |
of(K k1,
V v1,
K k2,
V v2,
K k3,
V v3)
Returns an immutable map with three mappings.
|
static <K,V> Map<K,V> |
of(K k1,
V v1,
K k2,
V v2,
K k3,
V v3,
K k4,
V v4)
Returns an immutable map with four mappings.
|
static <K,V> Map<K,V> |
singleEntry(K key,
V value)
Returns a single-entry map, containing the given key-value pair.
|
static <K,V> String |
stringify(Map<K,V> map,
String separator,
IStringify<Map.Entry<K,V>> stringify)
Creates a string representation of the given map, using its
entries as values. |
static <K,V> String |
stringify(Map<K,V> map,
String prefix,
String suffix,
boolean includePrefixAndSuffixOnlyIfMapNotEmpty,
String separator,
IStringify<Map.Entry<K,V>> stringify)
Creates a string representation of the given map, using its
entries as values. |
static <K,V> String |
stringify(Map<K,V> map,
String prefix,
String suffix,
String separator,
IStringify<Map.Entry<K,V>> stringify)
Creates a string representation of the given map, using its
entries as values. |
public static <K,V> Maps.IMapBuilder<K,V> builder()
public static <K,V> String stringify(Map<K,V> map, String separator, IStringify<Map.Entry<K,V>> stringify) throws PortalException
entries
as values. By
convention, does not check whether the given stringify has returned null
before concatenating to the
result string.map
- the map.separator
- the separator to use between the entries of the map.stringify
- the stringfy to be used to convert entries in strings.PortalException
public static <K,V> String stringify(Map<K,V> map, String prefix, String suffix, String separator, IStringify<Map.Entry<K,V>> stringify) throws PortalException
entries
as values. By
convention, does not check whether the given stringify has returned null
before concatenating to the
result string.map
- the map.prefix
- the prefix to be appended in final string.suffix
- the suffix to be appended in final string.separator
- the separator to use between the entries of the map.stringify
- the stringfy to be used to convert entries in strings.PortalException
public static <K,V> String stringify(Map<K,V> map, String prefix, String suffix, boolean includePrefixAndSuffixOnlyIfMapNotEmpty, String separator, IStringify<Map.Entry<K,V>> stringify) throws PortalException
entries
as values. By
convention, does not check whether the given stringify has returned null
before concatenating to the
result string.map
- the map.prefix
- the prefix to be appended in final string.suffix
- the suffix to be appended in final string.includePrefixAndSuffixOnlyIfMapNotEmpty
- indicates whether prefix and suffix should be added only if the given collection is not empty.separator
- the separator to use between the entries of the map.stringify
- the stringfy to be used to convert entries in strings.PortalException
public static <K,V> Map<K,V> singleEntry(K key, V value)
key
- the keyvalue
- the valuepublic static <K,V> Map.Entry<K,V> entryOf(K key, V value)
key
- the key.value
- the value.public static <K,V> Map<K,V> of(K k1, V v1)
k1
- the key of mapping.v1
- the value of mapping.public static <K,V> Map<K,V> of(K k1, V v1, K k2, V v2)
k1
- the key of mapping 1.v1
- the value of mapping 1.k2
- the key of mapping 2.v2
- the value of mapping 2.public static <K,V> Map<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3)
k1
- the key of mapping 1.v1
- the value of mapping 1.k2
- the key of mapping 2.v2
- the value of mapping 2.k3
- the key of mapping 3.v3
- the value of mapping 3.public static <K,V> Map<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4)
k1
- the key of mapping 1.v1
- the value of mapping 1.k2
- the key of mapping 2.v2
- the value of mapping 2.k3
- the key of mapping 3.v3
- the value of mapping 3.k4
- the key of mapping 4.v4
- the value of mapping 4.LumisXP 12.0.0.190809 - Copyright © 2006–2019 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.