René's URL Explorer Experiment
Title: Sequenced collections | java.evolved
Open Graph Title: Sequenced collections | java.evolved
X Title: Sequenced collections | java.evolved
Description: Access first/last elements and reverse views with clean API methods.
Open Graph Description: Access first/last elements and reverse views with clean API methods.
X Description: Access first/last elements and reverse views with clean API methods.
Opengraph URL: https://javaevolved.github.io/collections/sequenced-collections.html
direct link
Domain: javaevolved.github.io
Hey, it has json ld scripts:
{
"@context": "https://schema.org",
"@type": "TechArticle",
"headline": "Sequenced collections",
"description": "Access first/last elements and reverse views with clean API methods.",
"url": "https://javaevolved.github.io/sequenced-collections.html",
"publisher": {
"@type": "Organization",
"name": "java.evolved",
"url": "https://javaevolved.github.io"
},
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://javaevolved.github.io/sequenced-collections.html"
}
}
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": "https://javaevolved.github.io/"
},
{
"@type": "ListItem",
"position": 2,
"name": "Collections",
"item": "https://javaevolved.github.io/#collections"
},
{
"@type": "ListItem",
"position": 3,
"name": "Sequenced collections"
}
]
}
| theme-color | #f97316 |
| mobile-web-app-capable | yes |
| apple-mobile-web-app-status-bar-style | black-translucent |
| apple-mobile-web-app-title | java.evolved |
| og:type | article |
| og:site_name | java.evolved |
| og:locale | en |
| og:image | https://javaevolved.github.io/og/collections/sequenced-collections.png |
| og:image:width | 1200 |
| og:image:height | 630 |
| og:image:type | image/png |
| twitter:card | summary_large_image |
| twitter:image | https://javaevolved.github.io/og/collections/sequenced-collections.png |
Links:
| java.evolved | https://javaevolved.github.io/ |
|
| https://github.com/javaevolved/javaevolved.github.io |
| ← All patterns | https://javaevolved.github.io/ |
| ← | https://javaevolved.github.io/collections/map-entry-factory.html |
| → | https://javaevolved.github.io/collections/collectors-teeing.html |
| Home | https://javaevolved.github.io/ |
| Collections | https://javaevolved.github.io/#collections |
| 🐛 Report a code issue | https://github.com/javaevolved/javaevolved.github.io/issues/new?template=code-issue.yml&title=%5BCode%20Issue%5D%20Sequenced%20collections&category=collections&slug=sequenced-collections |
| 🌐 Report a translation issue | https://github.com/javaevolved/javaevolved.github.io/issues/new?template=translation-issue.yml&title=%5BTranslation%5D%20Sequenced%20collections%20%28English%29&locale=en&pattern=sequenced-collections&area=Pattern%20content |
| 💡 Suggest a new pattern | https://github.com/javaevolved/javaevolved.github.io/issues/new?template=new-pattern.yml |
| 𝕏 | https://x.com/intent/tweet?url=https%3A%2F%2Fjavaevolved.github.io%2Fcollections%2Fsequenced-collections.html&text=Sequenced%20collections%20%E2%80%93%20java.evolved |
| 🦋 | https://bsky.app/intent/compose?text=Sequenced%20collections%20%E2%80%93%20java.evolved%20https%3A%2F%2Fjavaevolved.github.io%2Fcollections%2Fsequenced-collections.html |
| in | https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fjavaevolved.github.io%2Fcollections%2Fsequenced-collections.html |
| ⬡ | https://www.reddit.com/submit?url=https%3A%2F%2Fjavaevolved.github.io%2Fcollections%2Fsequenced-collections.html&title=Sequenced%20collections%20%E2%80%93%20java.evolved |
| Let us know. | https://github.com/javaevolved/javaevolved.github.io/issues/new?template=code-issue.yml&title=%5BCode%20Issue%5D%20Sequenced%20collections&category=collections&slug=sequenced-collections |
| Sequenced Collections (JEP 431) ↗ | https://openjdk.org/jeps/431 |
| SequencedCollection ↗ | https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/SequencedCollection.html |
| View proof source ↗ | https://github.com/javaevolved/javaevolved.github.io/blob/main/proof/collections/SequencedCollections.java |
|
Collections
Intermediate
Collectors.teeing()
Java 8
long count = items.stream().count();
double sum = items.stream()
.mapToDouble(Item::price)
.sum();
var result = new Stats(count, sum);
Java 12+
var result = items.stream().collect(
Collectors.teeing(
Collectors.counting(),
Collectors.summingDouble(Item::price),
Stats::new
)
);
Hover to see modern ➜
JDK 12+
→
| https://javaevolved.github.io/collections/collectors-teeing.html |
|
Collections
Beginner
Immutable set creation
Java 8
Set set =
Collections.unmodifiableSet(
new HashSet<>(
Arrays.asList("a", "b", "c")
)
);
Java 9+
Set set =
Set.of("a", "b", "c");
Hover to see modern ➜
JDK 9+
→
| https://javaevolved.github.io/collections/immutable-set-creation.html |
|
Collections
Beginner
Immutable map creation
Java 8
Map map = new HashMap<>();
map.put("a", 1);
map.put("b", 2);
map.put("c", 3);
map = Collections.unmodifiableMap(map);
Java 9+
Map map =
Map.of("a", 1, "b", 2, "c", 3);
Hover to see modern ➜
JDK 9+
→
| https://javaevolved.github.io/collections/immutable-map-creation.html |
| java.evolved | https://javaevolved.github.io/ |
| Bruno Borges | https://github.com/brunoborges |
| GitHub Copilot | https://github.com/features/copilot |
| modern-css.com | https://modern-css.com |
| View on GitHub | https://github.com/javaevolved/javaevolved.github.io |
Viewport: width=device-width, initial-scale=1.0
Robots: index, follow
URLs of crawlers that visited me.