I have a map-like type
SmurfMap<K, V> which in certain contexts I use as a set-like
SmurfMap<K, Void>. Implementation details forbid the values of the map from being
null, so I cannot actually use
Void as a unit type. Are there any non-null alternatives to
Void in the JCL or Guava?
Types considered and not yet rejected:
- new singleton enum
SmurfMap<K, V> does not implement
java.util.Map. The datastructure backing a
SmurfMap is terabytes to petabytes in size.