Skip to content

Commit b227664

Browse files
committed
DATACMNS-1837 - Polishing.
Consistent callout indentation. Tweak wording. Original pull request: #475.
1 parent 238523e commit b227664

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/main/asciidoc/repositories.adoc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -541,22 +541,23 @@ The following listing shows an example:
541541
====
542542
[source, java]
543543
----
544-
class Product { <1>
544+
class Product { <1>
545545
MonetaryAmount getPrice() { … }
546546
}
547547
548548
@RequiredArgConstructor(staticName = "of")
549-
class Products implements Streamable<Product> { <2>
549+
class Products implements Streamable<Product> { <2>
550550
551551
private Streamable<Product> streamable;
552552
553-
public MonetaryAmount getTotal() { <3>
554-
return streamable.stream() //
553+
public MonetaryAmount getTotal() { <3>
554+
return streamable.stream()
555555
.map(Priced::getPrice)
556556
.reduce(Money.of(0), MonetaryAmount::add);
557557
}
558558
559-
@Override public Iterator<Product> iterator() { // <4>
559+
@Override
560+
public Iterator<Product> iterator() { <4>
560561
return streamable.iterator();
561562
}
562563
}
@@ -570,7 +571,7 @@ interface ProductRepository implements Repository<Product, Long> {
570571
A standard constructor taking the `Streamable<Product>` will do as well.
571572
<3> The wrapper type exposes an additional API, calculating new values on the `Streamable<Product>`.
572573
<4> Implement the `Streamable` interface and delegate to the actual result.
573-
<5> That wrapper type can be used as a query method return type directly. You need not return `Streamable<Product>` and manually wrap it in the repository client.
574+
<5> That wrapper type `Products` can be used directly as a query method return type. You do not need to return `Streamable<Product>` and manually wrap it after the query in the repository client.
574575
====
575576

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

0 commit comments

Comments
 (0)