Class TUnmodifiableByteLists



  • public class TUnmodifiableByteLists
    extends Object
    • Method Detail

      • wrap

        public static TByteList wrap(TByteList list)
        Returns an unmodifiable view of the specified Trove primitive list. This method allows modules to provide users with "read-only" access to internal lists. Query operations on the returned list "read through" to the specified list, and attempts to modify the returned list, whether direct or via its iterator, result in an UnsupportedOperationException.

        The returned list will be serializable if the specified list is serializable. Similarly, the returned list will implement RandomAccess if the specified list does.

        Parameters:
        list - the list for which an unmodifiable view is to be returned.
        Returns:
        an unmodifiable view of the specified Trove primitive list.