Auto saved by Logseq
This commit is contained in:
parent
de14b0747e
commit
c299225157
@ -1,14 +1,14 @@
|
|||||||
- String key value to map [[Code Snippet]] [[Java]]
|
- String key value to map [[Code Snippet]] [[Java]]
|
||||||
- ``` java
|
- ``` java
|
||||||
private MultiValueMap<String, String> params(final String... params) {
|
private MultiValueMap<String, String> params(final String... params) {
|
||||||
if (params.length % 2 != 0) {
|
if (params.length % 2 != 0) {
|
||||||
throw new IllegalArgumentException("The params need to be as key value pair");
|
throw new IllegalArgumentException("The params need to be as key value pair");
|
||||||
}
|
}
|
||||||
final LinkedMultiValueMap<String, String> result = new LinkedMultiValueMap<>();
|
final LinkedMultiValueMap<String, String> result = new LinkedMultiValueMap<>();
|
||||||
IntStream.range(0, params.length / 2)
|
IntStream.range(0, params.length / 2)
|
||||||
.map(i -> i * 2)
|
.map(i -> i * 2)
|
||||||
.mapToObj(i -> new ImmutablePair<>(params[i], params[i + 1]))
|
.mapToObj(i -> new ImmutablePair<>(params[i], params[i + 1]))
|
||||||
.forEach(p -> result.add(p.getLeft(), p.getRight()));
|
.forEach(p -> result.add(p.getLeft(), p.getRight()));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -21,5 +21,7 @@
|
|||||||
- Wer braucht welche Software
|
- Wer braucht welche Software
|
||||||
- Mobilgeräte
|
- Mobilgeräte
|
||||||
- Wer soll welches Gerät haben
|
- Wer soll welches Gerät haben
|
||||||
- Bechtle als Dienstleister, Inbetriebnahme immer im LAN von BDO Gebäude
|
- Bechtle als Dienstleister
|
||||||
|
- Inbetriebnahme immer im LAN von BDO Gebäude
|
||||||
- neue Geräte
|
- neue Geräte
|
||||||
|
- wer braucht wo sein Gerät
|
||||||
Loading…
x
Reference in New Issue
Block a user