Skip to content

Allow different Set and Map bases

Compare
Choose a tag to compare
@davidmorgan davidmorgan released this 04 Dec 12:28
· 175 commits to master since this release
f440a2f

BuiltSet and BuiltMap now allow you to specify the underlying collection type. For example, you can construct a BuiltSet using a SplayTreeSet. This results in a set that is always in sorted order instead of preserving insertion order. Another useful possibility is to use a HashSet, which leads to a random order but improves performance over the default.

See SetBuilder.withBase and MapBuilder.withBase.