public interface Unmodifiable
This interface enables testing such as:
if (coll instanceof Unmodifiable) { coll = new ArrayList(coll); } // now we know coll is modifiableOf course all this only works if you use the Unmodifiable classes defined in this library. If you use the JDK unmodifiable class via
java.util Collections
then the interface won't be there.Copyright © 2001–2019 The Apache Software Foundation. All rights reserved.