Class ArrayUInteger

    • Constructor Detail

      • ArrayUInteger

        public ArrayUInteger​(CollectionNumber coll)
        Constructs a list containing the values provided by the specified collection in the order returned by its iterator.
        Parameters:
        coll - the collection whose values will be placed in this list
    • Method Detail

      • size

        public final int size()
        Description copied from interface: CollectionNumber
        Returns the number of elements in the collection.
        Specified by:
        size in interface CollectionNumber
        Returns:
        the number of elements in the collection
      • getInt

        public int getInt​(int index)
        Description copied from interface: ListNumber
        Returns the element at the specified position in this list casted to an int.
        Specified by:
        getInt in interface ListNumber
        Parameters:
        index - position of the element to return
        Returns:
        the element at the specified position in this list
      • setInt

        public void setInt​(int index,
                           int value)
        Description copied from interface: ListNumber
        Changes the element at the specified position, casting to the internal representation.
        Specified by:
        setInt in interface ListNumber
        Overrides:
        setInt in class ListUInteger
        Parameters:
        index - position of the element to change
        value - the new value
      • subList

        public ArrayUInteger subList​(int fromIndex,
                                     int toIndex)
        Description copied from interface: ListNumber
        Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive.
        Specified by:
        subList in interface ListNumber
        Overrides:
        subList in class ListUInteger
        Parameters:
        fromIndex - low endpoint (inclusive) of the subList
        toIndex - high endpoint (exclusive) of the subList
        Returns:
        a view of the specified range within this list
      • setAll

        public void setAll​(int index,
                           ListNumber list)
        Description copied from interface: ListNumber
        Changes the elements starting at the specified position, taking them based on the internal representation.
        Specified by:
        setAll in interface ListNumber
        Overrides:
        setAll in class ListUInteger
        Parameters:
        index - position of the first element to change
        list - the new values
      • of

        public static ArrayUInteger of​(int... values)
        Returns an unmodifiable ArrayUInteger wrapper for the given int array.
        Parameters:
        values - a primitive array.
        Returns:
        an immutable wrapper.