Class CollectionImmutability

  • All Implemented Interfaces:
    Predicate<Object>, Immutability

    public class CollectionImmutability
    extends Object
    implements Immutability
    Tests the immutability of Collections wrappers. N.B. Strictly speaking, an unmodifiable collection is not necessarily immutable since the collection can still be modified through a reference to the delegate collection. Were this the case, the immutability test would also run against the delegate collection - and fail, forcing replication.
    Author:
    Paul Ferraro
    • Constructor Detail

      • CollectionImmutability

        public CollectionImmutability​(Immutability elementImmutability)