@@ -21,34 +21,34 @@ Usage
2121
2222Java 8:
2323``` java
24- Tuple3 <String , String , String > tuple = Tuple . of(" v01" , " v02" , " v03 " );
24+ Tuple2 <String , String > tuple = Tuple . of(" v01" , " v02" );
2525System . out. println(tuple. v1()); // "v01"
26- System . out. println(tuple. v3 ()); // "v03 "
26+ System . out. println(tuple. v2 ()); // "v02 "
2727
28- List<Tuple3<String , Integer , String > > list = Arrays . asList(
28+ List<Tuple3<String , Integer , String > > tuples = Arrays . asList(
2929 Tuple . of(" v10" , 11 , " v12" ),
3030 Tuple . of(" v20" , 21 , " v22" ),
3131 Tuple . of(" v30" , 31 , " v32" )
3232);
3333
34- list . stream()
34+ tuples . stream()
3535 .map(Tuple :: v3)
3636 .forEachOrdered(System . out:: print); // "v12v22v32"
3737```
3838
3939Java 10:
4040``` java
41- var tuple = Tuple . of(" v01" , " v02" , " v03 " );
41+ var tuple = Tuple . of(" v01" , " v02" );
4242System . out. println(tuple. v1()); // "v01"
43- System . out. println(tuple. v3 ()); // "v03 "
43+ System . out. println(tuple. v2 ()); // "v02 "
4444
45- var list = List . of(
45+ var tuples = List . of(
4646 Tuple . of(" v10" , 11 , " v12" ),
4747 Tuple . of(" v20" , 21 , " v22" ),
4848 Tuple . of(" v30" , 31 , " v32" )
4949);
5050
51- list . stream()
51+ tuples . stream()
5252 .map(Tuple :: v3)
5353 .forEachOrdered(System . out:: print); // "v12v22v32"
5454```
0 commit comments