Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Right, but this project doesn't solve that problem, either. It wraps the underlying collection in a builder to make it less easy to access, but it doesn't appear that it places any additional restrictions on the types of members or collection elements (from the generated code on their site anyway).

If you weren't using this library, you could achieve something similar with, e.g.,

  someImmutableSet = Collections.unmodifiableSet(new HashSet<E>(someSet));
I think this library really is about making immutable objects accessible, i.e., taking away the boiler plate. Hand-writing immutable (and potentially mutable) implementations on top of interfaces for a whole set of DTOs is super annoying.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: