Stephan Stephan - 5 months ago 87
Java Question

How to workaround this JDK limitation?

I'm looking for a class from the Java Collection Framework that would not allow null elements.

Do you know one?


Most Queue implementations (with the notable exception of LinkedList) don't accept null.

EnumSet is a special-purpose Set implementation that doesn't allow null values.