I'm searching for a java library for collections with no methods that allow for mutations. effectively immutable read only collections.
By that I mean, NO METHODS. Not like the usual Java immutable collections that have methods like add
or remove
that throw an exception when called. No... I want the compiler to let me know I'm trying to do something not allowed, instead of some error at runtime.
I know it exists because I've used it, but I cannot remember the name of such library.
question from:
https://stackoverflow.com/questions/66051737/typesafe-effectively-read-only-java-collections 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…