Optional features of classes derived from
- George van den Driessche
The collection must not throw
, but instead
must return a simple
Indicates that a collection disallows certain elements (other than
, whose validity as an element is indicated by the presence
or absence of
From the documentation for
"Some collection implementations have restrictions on the
elements that they may contain. For example, some implementations
prohibit null elements, and some have restrictions on the types of their
Indicates that a collection has a well-defined ordering of its elements.
The ordering may depend on the element values, such as a
or on the insertion ordering, such as a
. All list
tests and sorted-collection tests automatically specify this feature.
Indicates that the constructor or factory method of a collection, usually
an immutable set, throws an
with duplicate elements instead of collapsing them to a single element or
including duplicate instances in the collection.
Features supported by collections where only removal is allowed.