@ParametersAreNonnullByDefault public class VersionCollectionManipulators extends Object
Constructor and Description |
---|
VersionCollectionManipulators() |
Modifier and Type | Method and Description |
---|---|
static <T,T2> void |
updateValueIfChangedAfterTranformation(T originalValue,
Function<T,T2> transformer,
java.util.function.Consumer<T2> valueConsumer)
Transforms given value with given function.
|
static Function<Collection<Version>,Collection<Version>> |
versionRemover(Version versionToRemove)
Gets a function than in given version collection removes all occurences of versionToRemove
|
static Function<Collection<Version>,Collection<Version>> |
versionReplacer(Version versionToRemove,
Version versionToSwap)
Gets a function than in given version collection replaces all occurences of versionToRemove with version ToSwap
|
public static Function<Collection<Version>,Collection<Version>> versionReplacer(Version versionToRemove, Version versionToSwap)
versionToRemove
- The version to remove.versionToSwap
- The version being swapped in. May be null (in which case nothing gets swapped in).public static Function<Collection<Version>,Collection<Version>> versionRemover(Version versionToRemove)
versionToRemove
- The version to remove.public static <T,T2> void updateValueIfChangedAfterTranformation(T originalValue, Function<T,T2> transformer, java.util.function.Consumer<T2> valueConsumer)
Object.equals(Object)
original value) after
transformation it's passed to a given consumer.T
- original value typeT2
- value type after transformationoriginalValue
- original valuetransformer
- value transformationvalueConsumer
- object that accepts changed valueCopyright © 2002-2021 Atlassian. All Rights Reserved.