liveBook · Manning

Ordered set

An ordered set is a collection of distinct elements maintained according to a defined ordering, comparator, natural ordering, or associated ordering value.

How 3 Manning books explain it

Amazon Web Services in Action, Third Edition: An in-depth guide to AWS

A sorted set is a collection of unique members maintained in order according to an associated score or ordering value.

How it is used
Uses a Redis sorted set as an in-memory game leaderboard for frequent score and rank reads.
How deep it goes
Explains automatic score-based ordering and fast retrieval, but not sorted-set internals.
Examples
Uses a mobile-game leaderboard of player scores and ranks as its concrete example.
What you can do after
Apply a Redis sorted set to keep game scores ordered and retrieve leaderboard data from memory.

Read how Amazon Web Services in Action, Third Edition: An in-depth guide to AWS explains ordered set →

Java Persistence with Spring Data and Hibernate epub

SortedSet is the Java collection interface for a set whose elements are ordered according to a specified comparator or their natural ordering.

How it is used
Deploys SortedSet for unique persistent elements whose iteration order must remain stable.
How deep it goes
Explains TreeSet initialization, natural or comparator sorting, in-memory loading behavior, and the database-ordering alternative.
Examples
Uses a persistent set of image filenames, natural String ordering, custom comparators, and LinkedHashSet database ordering.
What you can do after
Operate/configure a Hibernate SortedSet mapping and select between in-memory sorting and database ordering.

Read how Java Persistence with Spring Data and Hibernate epub explains ordered set →

Clojure: The Essential Reference

sorted-set is a Clojure function that creates a set whose elements are maintained according to a comparator-defined ordering.

How it is used
Maintains unique values in comparator order, especially when updates and ordered lookup occur incrementally.
How deep it goes
Defines inputs, outputs, exceptions, implementation class, comparator behavior, metadata, and custom tie-breaking examples.
Examples
Uses reverse sorting, custom collection comparators, metadata on duplicate values, and an incrementally updated dictionary.
What you can do after
Build it from scratch with sorted-set or sorted-set-by, select comparators, preserve ordering during updates, and avoid comparator-induced duplicates.

Read how Clojure: The Essential Reference explains ordered set →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.