Guava has the ability to define ranges over discrete domains and then create a collection representing those numbers.
Is it possible to create ranges over characters of the modern english latin alphabet?
Maybe this suggests that it is not possible, but I don’t really understand their definition of a discrete domain:
A discrete domain always represents the entire set of values of its
type; it cannot represent partial domains such as “prime integers”,
“strings of length 5,” or “timestamps at midnight.”
Aren’t all strings of length 5 a discrete set? Wouldn’t a set of all possible latin characters be a definition of a discrete domain?
Since Guava Ranges must be contiguous, you may not be able to use one single Range, but you could certainly create multiple Range objects and combine their set representations to get a collection of the values in the ranges.