public class BambooFunctions extends Object
Modifier and Type | Method and Description |
---|---|
static BiFunction<Long,Long,Long> |
addLong() |
static <F,T> com.google.common.base.Function<F,T> |
constant(T result) |
static <A,B> com.google.common.base.Function<Pair<A,B>,A> |
firstOfPair() |
static com.google.common.base.Function<List<Long>,Long> |
foldListOfLong() |
static com.google.common.base.Function<ArtifactLink,Artifact> |
getArtifactFromArtifactLink()
Retrieves
Artifact from an ArtifactLink . |
static com.google.common.base.Function<Artifact,String> |
getArtifactName()
|
static com.google.common.base.Function<BambooIdProvider,Long> |
getBambooObjectId() |
static com.google.common.base.Function<Enum,String> |
getEnumName() |
static com.google.common.base.Function<Label,String> |
getLabelName()
Deprecated.
since 5.10, use method reference to
Label.getName() |
static com.google.common.base.Function<Label,String> |
getLabelNamespace()
Deprecated.
since 5.10, use method reference to
Label.getNamespace() |
static com.google.common.base.Function<ResultKeyProvider,ResultKey> |
getResultKey()
Extract ResultKey from ResultKeyProvider
JDK8: replace with lambda
|
static <E extends Exception,T> |
getResultOrNull() |
static <T> com.google.common.base.Function<Integer,T> |
itemFromList(List<T> items) |
static <E extends Enum<E>> |
lesserOf() |
static <K,V,R> Function<? super Map.Entry<K,V>,R> |
liftToEntryFunction(BiFunction<K,V,R> biFunction)
Adapts the supplied biFunction so that it can be used to process map entries
|
static BiFunction<Long,Long,Long> |
max() |
static com.google.common.base.Function<String,Integer> |
parseInt()
Deprecated.
since 5.11 use method reference to
Integer.valueOf(String) |
static com.google.common.base.Function<String,Long> |
parseLong()
Deprecated.
since 5.11 use method reference to
Long.valueOf(String) |
static <E extends Exception,T> |
resultIsException() |
static <E extends Exception,T> |
resultIsResult() |
static com.google.common.base.Function<String,String> |
toUpperCase()
Deprecated.
since 5.11 use method reference to
StringUtils.upperCase(String) |
static com.google.common.base.Function<String,String> |
translate(com.opensymphony.xwork2.TextProvider textProvider)
Function which translates i18n keys to text using given
TextProvider . |
static com.google.common.base.Function<String,String> |
trim()
Deprecated.
since 5.11 use method reference to
StringUtils.trim(String) |
public static <F,T> com.google.common.base.Function<F,T> constant(@Nullable T result)
@Deprecated public static com.google.common.base.Function<String,Integer> parseInt()
Integer.valueOf(String)
@Deprecated public static com.google.common.base.Function<String,Long> parseLong()
Long.valueOf(String)
@Deprecated public static com.google.common.base.Function<String,String> toUpperCase()
StringUtils.upperCase(String)
@Deprecated public static com.google.common.base.Function<String,String> trim()
StringUtils.trim(String)
public static <T> com.google.common.base.Function<Integer,T> itemFromList(List<T> items)
public static com.google.common.base.Function<BambooIdProvider,Long> getBambooObjectId()
public static BiFunction<Long,Long,Long> addLong()
public static BiFunction<Long,Long,Long> max()
public static <E extends Exception,T> com.google.common.base.Function<Result<E,T>,T> getResultOrNull()
public static <E extends Exception,T> com.google.common.base.Predicate<Result<E,T>> resultIsException()
public static <E extends Exception,T> com.google.common.base.Predicate<Result<E,T>> resultIsResult()
@Deprecated public static com.google.common.base.Function<Label,String> getLabelName()
Label.getName()
@Deprecated public static com.google.common.base.Function<Label,String> getLabelNamespace()
Label.getNamespace()
public static <E extends Enum<E>> BiFunction<E,E,E> lesserOf()
public static com.google.common.base.Function<String,String> translate(@NotNull com.opensymphony.xwork2.TextProvider textProvider)
TextProvider
. The function uses TextProvider.getText(String)
method, without any additional arguments.textProvider
- text providerpublic static com.google.common.base.Function<ResultKeyProvider,ResultKey> getResultKey()
public static com.google.common.base.Function<ArtifactLink,Artifact> getArtifactFromArtifactLink()
Artifact
from an ArtifactLink
.public static <A,B> com.google.common.base.Function<Pair<A,B>,A> firstOfPair()
public static <K,V,R> Function<? super Map.Entry<K,V>,R> liftToEntryFunction(BiFunction<K,V,R> biFunction)
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.