Package com.atlassian.bamboo.utils
Class BambooFunctions
java.lang.Object
com.atlassian.bamboo.utils.BambooFunctions
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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> static com.google.common.base.Function<ArtifactLink,
Artifact> RetrievesArtifact
from anArtifactLink
.static com.google.common.base.Function<BambooIdProvider,
Long> Deprecated.static com.google.common.base.Function<ResultKeyProvider,
ResultKey> Extract ResultKey from ResultKeyProvider JDK8: replace with lambdastatic <T> com.google.common.base.Function<Integer,
T> itemFromList
(List<T> items) static <E extends Enum<E>>
BinaryOperator<E>lesserOf()
liftToEntryFunction
(BiFunction<K, V, R> biFunction) Adapts the supplied biFunction so that it can be used to process map entriesstatic BiFunction<Long,
Long, Long> max()
translate
(@NotNull com.opensymphony.xwork2.TextProvider textProvider) Function which translates i18n keys to text using givenTextProvider
.
-
Method Details
-
constant
public static <F,T> com.google.common.base.Function<F,T> constant(@Nullable T result) -
itemFromList
-
getBambooObjectId
-
addLong
-
foldListOfLong
-
max
-
getResultOrNull
-
resultIsException
-
resultIsResult
-
getEnumName
Deprecated.use method reference toEnum.name()
-
lesserOf
-
translate
public static com.google.common.base.Function<String,String> translate(@NotNull @NotNull com.opensymphony.xwork2.TextProvider textProvider) Function which translates i18n keys to text using givenTextProvider
. The function usesTextProvider.getText(String)
method, without any additional arguments.- Parameters:
textProvider
- text provider- Returns:
- translation function
-
getResultKey
Extract ResultKey from ResultKeyProvider JDK8: replace with lambda -
getArtifactFromArtifactLink
RetrievesArtifact
from anArtifactLink
. -
getArtifactName
-
firstOfPair
-
liftToEntryFunction
public static <K,V, Function<? super Map.Entry<K,R> V>, liftToEntryFunctionR> (BiFunction<K, V, R> biFunction) Adapts the supplied biFunction so that it can be used to process map entries
-
Enum.name()