Skip to content

Commit eccb067

Browse files
committed
DATACMNS-1837 - Polishing.
Consistent callout indentation. Tweak wording. Original pull request: #475.
1 parent 70c9a0d commit eccb067

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/main/asciidoc/repositories.adoc

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -643,23 +643,24 @@ The following listing shows an example:
643643
====
644644
[source,java]
645645
----
646-
class Product { <1>
646+
class Product { <1>
647647
MonetaryAmount getPrice() { … }
648648
}
649649
650650
@RequiredArgConstructor(staticName = "of")
651-
class Products implements Streamable<Product> { <2>
651+
class Products implements Streamable<Product> { <2>
652652
653653
private Streamable<Product> streamable;
654654
655-
public MonetaryAmount getTotal() { <3>
656-
return streamable.stream() //
655+
public MonetaryAmount getTotal() { <3>
656+
return streamable.stream()
657657
.map(Priced::getPrice)
658658
.reduce(Money.of(0), MonetaryAmount::add);
659659
}
660660
661661
662-
@Override public Iterator<Product> iterator() { // <4>
662+
@Override
663+
public Iterator<Product> iterator() { <4>
663664
return streamable.iterator();
664665
}
665666
}
@@ -673,8 +674,8 @@ interface ProductRepository implements Repository<Product, Long> {
673674
A standard constructor taking the `Streamable<Product>` will do as well.
674675
<3> The wrapper type exposes an additional API, calculating new values on the `Streamable<Product>`.
675676
<4> Implement the `Streamable` interface and delegate to the actual result.
676-
<5> That wrapper type can be used as a query method return type directly.
677-
You need not return `Streamable<Product>` and manually wrap it in the repository client.
677+
<5> That wrapper type `Products` can be used directly as a query method return type.
678+
You do not need to return `Streamable<Product>` and manually wrap it after the query in the repository client.
678679
====
679680

680681
[[repositories.collections-and-iterables.vavr]]

0 commit comments

Comments
 (0)