Uses of Class
dk.cloudcreate.essentials.shared.functional.tuple.Pair
Packages that use Pair
Package
Description
-
Uses of Pair in dk.cloudcreate.essentials.shared.collections
Methods in dk.cloudcreate.essentials.shared.collections that return types with arguments of type PairModifier and TypeMethodDescriptionLists.toIndexedStream(List<T> list) Convert thelistto an 0-based Indexed Stream consisting ofPair's, where eachPairconsists of the 0-based Index (i.e. the first index has value 0) and the corresponding List element at the given index:Pair<Index, List-element-at-the-given-index>
Example:
List.of("A", "B", "C") will return aStreamof: Pair(0, "A") Pair(1, "B") Pair(2, "C") -
Uses of Pair in dk.cloudcreate.essentials.shared.functional.tuple
Methods in dk.cloudcreate.essentials.shared.functional.tuple that return PairModifier and TypeMethodDescriptionstatic <T1,T2> Pair<T1, T2> <R1,R2> Pair<R1, R2> Pair.map(BiFunction<? super T1, ? super T2, Pair<R1, R2>> mappingFunction) Maps the elements of thisPairusing the mapping function<R1,R2> Pair<R1, R2> Pair.map(Function<? super T1, ? super R1> mappingFunction1, Function<? super T2, ? super R2> mappingFunction2) Maps the elements of thisPairusing two distinct mapping functionsMap the first element of thisPairusing the mapping functionMap the second element of thisPairusing the mapping functionstatic <T1,T2> Pair<T1, T2> Pair.of(T1 t1, T2 t2) Create a newTuplewith 2 elementsstatic <T1,T2> Pair<T1, T2> Tuple.of(T1 t1, T2 t2) Create a newTuplewith 2 elementsPair.swap()Swap the elements of thisPairMethod parameters in dk.cloudcreate.essentials.shared.functional.tuple with type arguments of type Pair