Good way to get *any* value from a Java Set?
any, java, set
Solution
A `Set<T>` is an `Iterable<T>`, so iterating to the first element works:
Set<T> things = ...;
return things.iterator().next();
Guava has a method to do this, though the above snippet is likely better.
Problem
Given a simple `Set<T>`, what is a good way (fast, few lines of code) to get any value from the `Set`? With a `List`, it's easy: ``` List<T> things = ...; return things.get(0); ``` But, with a `Set`, there is no `.get(...)` method because `Set`s are not ordered.