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:
André Thiago 2017-12-21 13:06:58 -02:00 committed by KevinGilmore
parent 9ed1d5b7b4
commit 2bff7a623e
1 changed files with 3 additions and 1 deletions

View File

@ -25,7 +25,9 @@ public class ArrayInverter {
} }
public Object[] invertUsingStreams(final Object[] array) { 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) { public void invertUsingCommonsLang(Object[] array) {