Package gnu.lists

Class FVector<E>

    • Field Detail

      • empty

        protected static java.lang.Object[] empty
    • Constructor Detail

      • FVector

        public FVector()
      • FVector

        public FVector​(int size,
                       java.lang.Object value)
      • FVector

        public FVector​(int size)
      • FVector

        public FVector​(java.lang.Object[] data)
        Reuses the argument without making a copy.
      • FVector

        public FVector​(java.lang.Object[] values,
                       int offset,
                       int length)
        Makes a copy of (part of) the argument array.
      • FVector

        public FVector​(java.util.List seq)
    • Method Detail

      • make

        public static FVector make​(java.lang.Object... data)
      • makeConstant

        public static <E> FVector<E> makeConstant​(E... data)
      • replaceAll

        public void replaceAll​(E[] data)
      • copyFrom

        public void copyFrom​(int index,
                             GVector<E> src,
                             int start,
                             int end)
      • getBufferLength

        public int getBufferLength()
        Get the allocated length of the data buffer.
        Specified by:
        getBufferLength in class SimpleVector<E>
      • setBuffer

        protected void setBuffer​(java.lang.Object buffer)
        Specified by:
        setBuffer in class SimpleVector<E>
      • get

        public final E get​(int index)
        Description copied from interface: Sequence
        See java.util.List.
        Specified by:
        get in interface Array<E>
        Specified by:
        get in interface java.util.List<E>
        Specified by:
        get in interface Sequence<E>
        Overrides:
        get in class AbstractSequence<E>
      • getRaw

        public final E getRaw​(int index)
        Description copied from interface: Array
        Given an "effective index", return element as object.
        Specified by:
        getRaw in interface Array<E>
        Overrides:
        getRaw in class AbstractSequence<E>
      • setRaw

        public final void setRaw​(int index,
                                 java.lang.Object value)
        Description copied from class: AbstractSequence
        Given an "effective index", set selected element.
        Specified by:
        setRaw in interface Array<E>
        Overrides:
        setRaw in class AbstractSequence<E>
      • clearBuffer

        protected void clearBuffer​(int start,
                                   int count)
        Specified by:
        clearBuffer in class SimpleVector<E>
      • castOrNull

        public static FVector castOrNull​(java.lang.Object obj)
      • cast

        public static FVector cast​(java.lang.Object value)
      • fill

        public final void fill​(int start,
                               int end,
                               E new_value)
        Overrides:
        fill in class AbstractSequence<E>
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface java.util.Collection<E>
        Specified by:
        equals in interface java.util.List<E>
        Overrides:
        equals in class AbstractSequence<E>
      • compareTo

        public int compareTo​(java.lang.Object obj)
        Specified by:
        compareTo in interface java.lang.Comparable<E>