Interface ListNumber

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      byte getByte​(int index)
      Returns the element at the specified position in this list casted to a byte.
      double getDouble​(int index)
      Returns the element at the specified position in this list casted to a double.
      float getFloat​(int index)
      Returns the element at the specified position in this list casted to a float.
      int getInt​(int index)
      Returns the element at the specified position in this list casted to an int.
      long getLong​(int index)
      Returns the element at the specified position in this list casted to a long.
      short getShort​(int index)
      Returns the element at the specified position in this list casted to a short.
      void setAll​(int index, ListNumber list)
      Changes the elements starting at the specified position, taking them based on the internal representation.
      void setByte​(int index, byte value)
      Changes the element at the specified position, casting to the internal representation.
      void setDouble​(int index, double value)
      Changes the element at the specified position, casting to the internal representation.
      void setFloat​(int index, float value)
      Changes the element at the specified position, casting to the internal representation.
      void setInt​(int index, int value)
      Changes the element at the specified position, casting to the internal representation.
      void setLong​(int index, long value)
      Changes the element at the specified position, casting to the internal representation.
      void setShort​(int index, short value)
      Changes the element at the specified position, casting to the internal representation.
      ListNumber subList​(int fromIndex, int toIndex)
      Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive.
    • Method Detail

      • getDouble

        double getDouble​(int index)
        Returns the element at the specified position in this list casted to a double.
        Parameters:
        index - position of the element to return
        Returns:
        the element at the specified position in this list
        Throws:
        IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size())
      • getFloat

        float getFloat​(int index)
        Returns the element at the specified position in this list casted to a float.
        Parameters:
        index - position of the element to return
        Returns:
        the element at the specified position in this list
        Throws:
        IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size())
      • getLong

        long getLong​(int index)
        Returns the element at the specified position in this list casted to a long.
        Parameters:
        index - position of the element to return
        Returns:
        the element at the specified position in this list
        Throws:
        IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size())
      • getInt

        int getInt​(int index)
        Returns the element at the specified position in this list casted to an int.
        Parameters:
        index - position of the element to return
        Returns:
        the element at the specified position in this list
        Throws:
        IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size())
      • getShort

        short getShort​(int index)
        Returns the element at the specified position in this list casted to a short.
        Parameters:
        index - position of the element to return
        Returns:
        the element at the specified position in this list
        Throws:
        IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size())
      • getByte

        byte getByte​(int index)
        Returns the element at the specified position in this list casted to a byte.
        Parameters:
        index - position of the element to return
        Returns:
        the element at the specified position in this list
        Throws:
        IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size())
      • setDouble

        void setDouble​(int index,
                       double value)
        Changes the element at the specified position, casting to the internal representation.
        Parameters:
        index - position of the element to change
        value - the new value
        Throws:
        IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size())
      • setFloat

        void setFloat​(int index,
                      float value)
        Changes the element at the specified position, casting to the internal representation.
        Parameters:
        index - position of the element to change
        value - the new value
        Throws:
        IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size())
      • setLong

        void setLong​(int index,
                     long value)
        Changes the element at the specified position, casting to the internal representation.
        Parameters:
        index - position of the element to change
        value - the new value
        Throws:
        IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size())
      • setInt

        void setInt​(int index,
                    int value)
        Changes the element at the specified position, casting to the internal representation.
        Parameters:
        index - position of the element to change
        value - the new value
        Throws:
        IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size())
      • setShort

        void setShort​(int index,
                      short value)
        Changes the element at the specified position, casting to the internal representation.
        Parameters:
        index - position of the element to change
        value - the new value
        Throws:
        IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size())
      • setByte

        void setByte​(int index,
                     byte value)
        Changes the element at the specified position, casting to the internal representation.
        Parameters:
        index - position of the element to change
        value - the new value
        Throws:
        IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size())
      • setAll

        void setAll​(int index,
                    ListNumber list)
        Changes the elements starting at the specified position, taking them based on the internal representation.
        Parameters:
        index - position of the first element to change
        list - the new values
        Throws:
        IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()) or if this list is too short to hold the data.
      • subList

        ListNumber subList​(int fromIndex,
                           int toIndex)
        Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive.
        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
        Throws:
        IndexOutOfBoundsException - for an illegal endpoint index value (fromIndex < 0 || toIndex > size || fromIndex > toIndex)