BAEL-1328 Solving conflcts and applying code formatter. (#3273)
* BAEL-1328 How to Invert an Array in Java * Removing code from evaluation article. * BAEL-1328 Adjusting spaces and implement inversion with commons lang3 and guava. * BAEL-1328 Renaming unit test class; using AssertJ. * BAEL-1328 Change to use rangeClosed. * BAEL-1326 Solving conflicts and apply code formatting.
This commit is contained in:
parent
9ed1d5b7b4
commit
2bff7a623e
|
@ -25,7 +25,9 @@ public class ArrayInverter {
|
|||
}
|
||||
|
||||
public Object[] invertUsingStreams(final Object[] array) {
|
||||
return IntStream.range(1, array.length + 1).mapToObj(i -> array[array.length - i]).toArray();
|
||||
return IntStream.rangeClosed(1, array.length)
|
||||
.mapToObj(i -> array[array.length - i])
|
||||
.toArray();
|
||||
}
|
||||
|
||||
public void invertUsingCommonsLang(Object[] array) {
|
||||
|
|
Loading…
Reference in New Issue