Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Java 21 New Feature: Sequenced Collections

Java via YouTube

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore the principles of Sequenced Collections, Sets, and Maps, a new feature introduced in JDK 21. Dive into the Sequenced Collections API, part of the Collections Framework, which models collections with a defined encounter order and provides direct access to first and last elements. Learn about the architecture of the Collections API, understand the concept of sorted collections, and discover how elements are ordered using indexes. Compare Lists and SortedSets, examine the encounter order for various collection types, and explore the properties of LinkedHashSet. Investigate the common behaviors among different collection types and understand the defining characteristics of sequenced collections. Follow the implementation of SequencedCollection and SequencedSet in the Collections API, and see how Deque implements SequencedCollection. Gain insights into iterating over Map elements, including SortedMap and NavigableMap, and get introduced to SequencedMap. Finally, learn about creating unmodifiable views using the Collections factory class in this comprehensive 20-minute video on Java 21's new Sequenced Collections feature.

Syllabus

Intro
Introducing the architecture of the Collections API
What does it mean for a collection to be sorted
Ordering elements in a collection with an index
Differences between Lists and SortedSets
Defining the encounter order for List, Set, and SortedSet
Properties of LinkedHashSet
Common behavior between List, SortedSet and LinkedHashSet
Defining the behavior of sequenced collections
Adding SequencedCollection and SequencedSet to the Collections API
Making Deque implement SequencedCollection
Iterating over the elements of a Map
Iterating over the elements of a SortedMap or NavigableMap
Introducing SequencedMap
Creating unmodifiable views with the Collections factory class
Outro

Taught by

Java

Reviews

Start your review of Java 21 New Feature: Sequenced Collections

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.