Returns a read-only view of a sequenced collection: as unmodifiableCollection, with the
ends (getFirst, getLast) and a reversed view. It compares by identity.
When collection is already a view this function returns (printed as
UnmodifiableSequencedCollection), it is returned unchanged. When it is any other unmodifiable
view or immutable collection from this copy of the library, the new view reads that collection's
source instead, and entries it hands out stay read-only, so read-only wrappers never nest.
Time: O(1); each operation costs what the collection's costs.
Returns a read-only view of a sequenced collection: as unmodifiableCollection, with the ends (
getFirst,getLast) and a reversed view. It compares by identity.When
collectionis already a view this function returns (printed asUnmodifiableSequencedCollection), it is returned unchanged. When it is any other unmodifiable view or immutable collection from this copy of the library, the new view reads that collection's source instead, and entries it hands out stay read-only, so read-only wrappers never nest.Time: O(1); each operation costs what the collection's costs.