Skip to content

Commit

Permalink
fix(lambda): 馃悰 general translation
Browse files Browse the repository at this point in the history
Refers: #6
  • Loading branch information
rcmoutinho committed Sep 12, 2019
1 parent b46764e commit 6ffff54
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion book/04-lambda/sections/01-functional-interfaces.asc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ include::{section-java-package}/functionalinterfaces/FunctionalInterfaces_Extend
include::{section-java-package}/functionalinterfaces/FunctionalInterfaces_ExtendsNewMethod.java[tag=code]
----

. Utilizar a anota莽茫o `@FunctionalInterface` em interfaces que possuem mais de um m茅todo abstrato causa um erro de compila莽茫o.
. Using the `@FunctionalInterface` annotation on interfaces that have more than one abstract method causes a compilation error.
+
[source,java,indent=0]
.{java-package}/functionalinterfaces/FunctionalInterfaces_InterfaceCompilationError.java
Expand Down
4 changes: 2 additions & 2 deletions book/04-lambda/sections/03-built-in-interfaces.asc
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public interface BiFunction<T, U, R> {
}
----

. Possible implementations for `Function` or` BiFunction` are functions that multiply the given values:
. Possible implementations for `Function` or `BiFunction` are functions that multiply the given values:
+
[source,java,indent=0]
.{java-package}/builtininterfaces/BuiltInInterfaces_FunctionExample.java
Expand Down Expand Up @@ -244,7 +244,7 @@ public interface BinaryOperator<T> extends BiFunction<T,T,T> {
+
Note that there is no declared abstract method as it only extends the existing `BiFunction` interface.

. Possible implementations for `UnaryOperator` or` BinaryOperator` are functions that add a fixed number or add one number to another:
. Possible implementations for `UnaryOperator` or `BinaryOperator` are functions that add a fixed number or add one number to another:
+
[source,java,indent=0]
.{java-package}/builtininterfaces/BuiltInInterfaces_OperatorExample.java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ public class FunctionalInterfaces_InterfaceCompilationError {

// tag::code[]
@FunctionalInterface
interface Executavel { // interface funcional
void execute(); // m茅todo funcional
interface Executable { // function interface
void execute(); // functional method
}

@FunctionalInterface
interface Aplicacao extends Executavel { // N脙O COMPILA!
// n茫o pode ser anotada como funcional, pois possui 2 m茅todos abstratos
void inicie();
interface Application extends Executable { // NOT COMPILING!
// cannot be annotated as functional as it has 2 abstract methods
void init();
}
// end::code[]
}

0 comments on commit 6ffff54

Please sign in to comment.