The replaceAll method replaces all elements of the current ArrayList instance with the result of the UnaryOperator expression (say what??? - I'll explain). This method may not produce the results that you think it should as this method replaces each and every element with the result of an expression. There is another replaceAll method in the Collections class where you can replace certain elements with other values - I'll demonstrate that as well. In order to use this method, you will need to have a basic understanding of lambda expressions. If you are not familiar with lambda expressions, the following tutorials will teach you what you need to know in order to use this method:
Lambda Expressions Introduction
Lambda Block Body
Lambda and Generic Functional Interface
The UnaryOperator interface is a functional interface that has a single abstract method named apply that returns a result of the same object type as the operand. The UnaryOperator interface does not have an explicitly defined abstract method, rather it inherits the abstract method apply from it's superinterface, Function.
Nesta página do site você pode assistir ao vídeo on-line Learn Java Programming - ArrayList replaceAll Method Tutorial duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Daniel Ross 09 Novembro 2015, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 1,252 vezes e gostou 10 espectadores. Boa visualização!