|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.bamboo.util.BambooMaps
public class BambooMaps
Method Summary | ||
---|---|---|
static
|
generateMap(Set<K> keys,
com.google.common.base.Function<K,V> generator)
Convenience method for generating map out of set of keys, and value generator. |
|
static
|
getWithDefault(Map<K,V> map,
V defaultValue)
|
|
static
|
mutableLinkedUniqueIndex(Iterable<? extends V> values,
com.google.common.base.Function<? super V,? extends K> indexGenerator)
|
|
static
|
mutableUniqueIndex(Iterable<? extends V> values,
com.google.common.base.Function<? super V,? extends K> indexGenerator)
|
|
static
|
newHashMapFrom(Iterable<? extends V> source,
com.google.common.base.Function<V,Pair<K,V>> function)
|
|
static
|
newLinkedHashMapWithLimitedSize(int maxSize)
|
|
static
|
newNullAwareCache(com.google.common.cache.CacheBuilder<Object,Object> builder,
com.google.common.cache.CacheLoader<? super K,? extends V> loader)
Deprecated. since 5.6 use plan cache with Optional values |
|
static
|
newNullAwareCacheTyped(com.google.common.cache.CacheBuilder<K,com.atlassian.fugue.Option<V>> builder,
com.google.common.cache.CacheLoader<? super K,? extends V> loader)
Deprecated. since 5.6 use plan cache with Optional values |
|
static
|
nullMasquingLoader(com.google.common.cache.CacheLoader<? super K,? extends V> nullReturningLoader)
|
|
static
|
populateMap(Map<K,V> map,
V input,
com.google.common.base.Function<? super V,? extends K> indexGenerator)
Add entry to the map using Function to generate a key |
|
static
|
putAll(Map<K,? super V> map,
Iterable<Pair<K,V>> iterable)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <K,V> Map<K,V> newHashMapFrom(Iterable<? extends V> source, com.google.common.base.Function<V,Pair<K,V>> function)
public static <K,V> Map<K,V> newLinkedHashMapWithLimitedSize(int maxSize)
public static <K,V> void putAll(Map<K,? super V> map, Iterable<Pair<K,V>> iterable)
public static <K,V> Map<K,V> mutableUniqueIndex(Iterable<? extends V> values, com.google.common.base.Function<? super V,? extends K> indexGenerator)
public static <K,V> LinkedHashMap<K,V> mutableLinkedUniqueIndex(Iterable<? extends V> values, com.google.common.base.Function<? super V,? extends K> indexGenerator)
public static <K,V> V populateMap(@NotNull Map<K,V> map, @NotNull V input, @NotNull com.google.common.base.Function<? super V,? extends K> indexGenerator)
Function
to generate a key
map
- map that will get an extra elementinput
- element to be added to mapindexGenerator
- function that will generate key for a given element
Map.put(Object, Object)
@NotNull @Deprecated public static <K,V> NullAwareCache<K,V> newNullAwareCache(com.google.common.cache.CacheBuilder<Object,Object> builder, com.google.common.cache.CacheLoader<? super K,? extends V> loader)
NullAwareCache
using a supplied @CacheBuilder
and @CacheLoader
@NotNull @Deprecated public static <K,V> NullAwareCache<K,V> newNullAwareCacheTyped(com.google.common.cache.CacheBuilder<K,com.atlassian.fugue.Option<V>> builder, com.google.common.cache.CacheLoader<? super K,? extends V> loader)
@NotNull public static <K,V> com.google.common.cache.CacheLoader<? super K,com.atlassian.fugue.Option<V>> nullMasquingLoader(com.google.common.cache.CacheLoader<? super K,? extends V> nullReturningLoader)
public static <K,V> com.google.common.base.Function<K,V> getWithDefault(@NotNull Map<K,V> map, @Nullable V defaultValue)
public static <K,V> Map<K,V> generateMap(@NotNull Set<K> keys, @NotNull com.google.common.base.Function<K,V> generator)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |