Class TsFileResourceList

    • Constructor Detail

      • TsFileResourceList

        public TsFileResourceList()
    • Method Detail

      • insertBefore

        public void insertBefore​(TsFileResource node,
                                 TsFileResource newNode)
        Insert a new node before an existing node
        Parameters:
        node - the existing node
        newNode - the file to insert
      • insertAfter

        public void insertAfter​(TsFileResource node,
                                TsFileResource newNode)
        Insert a new node after an existing node
        Parameters:
        node - the existing node
        newNode - the file to insert
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<TsFileResource>
        Specified by:
        size in interface java.util.List<TsFileResource>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection<TsFileResource>
        Specified by:
        isEmpty in interface java.util.List<TsFileResource>
      • contains

        public boolean contains​(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection<TsFileResource>
        Specified by:
        contains in interface java.util.List<TsFileResource>
      • iterator

        public java.util.Iterator<TsFileResource> iterator()
        Specified by:
        iterator in interface java.util.Collection<TsFileResource>
        Specified by:
        iterator in interface java.lang.Iterable<TsFileResource>
        Specified by:
        iterator in interface java.util.List<TsFileResource>
      • reverseIterator

        public java.util.Iterator<TsFileResource> reverseIterator()
      • add

        public boolean add​(TsFileResource newNode)
        Insert a new tsFileResource node to the end of List
        Specified by:
        add in interface java.util.Collection<TsFileResource>
        Specified by:
        add in interface java.util.List<TsFileResource>
      • keepOrderInsert

        public boolean keepOrderInsert​(TsFileResource newNode)
                                throws java.io.IOException
        Insert a tsfile resource to the list, the tsfile will be inserted before the first tsfile whose timestamp is greater than its. If there is no tsfile whose timestamp is greater than the new node's, the new node will be inserted to the tail of the list.
        Throws:
        java.io.IOException
      • remove

        public boolean remove​(java.lang.Object o)
        The tsFileResourceListNode to be removed must be in the list, otherwise may cause unknown behavior
        Specified by:
        remove in interface java.util.Collection<TsFileResource>
        Specified by:
        remove in interface java.util.List<TsFileResource>
      • containsAll

        public boolean containsAll​(java.util.Collection<?> c)
        Specified by:
        containsAll in interface java.util.Collection<TsFileResource>
        Specified by:
        containsAll in interface java.util.List<TsFileResource>
      • addAll

        public boolean addAll​(java.util.Collection<? extends TsFileResource> c)
        Only List type parameter is legal, because it is in order.
        Specified by:
        addAll in interface java.util.Collection<TsFileResource>
        Specified by:
        addAll in interface java.util.List<TsFileResource>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<TsFileResource>
        Specified by:
        clear in interface java.util.List<TsFileResource>
      • toArray

        public java.lang.Object[] toArray()
        Specified by:
        toArray in interface java.util.Collection<TsFileResource>
        Specified by:
        toArray in interface java.util.List<TsFileResource>
      • toArray

        public <T> T[] toArray​(T[] a)
        Specified by:
        toArray in interface java.util.Collection<TsFileResource>
        Specified by:
        toArray in interface java.util.List<TsFileResource>
      • addAll

        public boolean addAll​(int index,
                              java.util.Collection<? extends TsFileResource> c)
        Specified by:
        addAll in interface java.util.List<TsFileResource>
      • removeAll

        public boolean removeAll​(java.util.Collection<?> c)
        Specified by:
        removeAll in interface java.util.Collection<TsFileResource>
        Specified by:
        removeAll in interface java.util.List<TsFileResource>
      • retainAll

        public boolean retainAll​(java.util.Collection<?> c)
        Specified by:
        retainAll in interface java.util.Collection<TsFileResource>
        Specified by:
        retainAll in interface java.util.List<TsFileResource>
      • set

        public TsFileResource set​(int index,
                                  TsFileResource element)
        insert tsFileResource to a target pos(targetPos = index) e.g. if index = 0, then to the first, if index = 1, then to the second.
        Specified by:
        set in interface java.util.List<TsFileResource>
      • indexOf

        public int indexOf​(java.lang.Object o)
        Specified by:
        indexOf in interface java.util.List<TsFileResource>
      • lastIndexOf

        public int lastIndexOf​(java.lang.Object o)
        Specified by:
        lastIndexOf in interface java.util.List<TsFileResource>
      • listIterator

        public java.util.ListIterator<TsFileResource> listIterator()
        Specified by:
        listIterator in interface java.util.List<TsFileResource>
      • listIterator

        public java.util.ListIterator<TsFileResource> listIterator​(int index)
        Specified by:
        listIterator in interface java.util.List<TsFileResource>
      • subList

        public java.util.List<TsFileResource> subList​(int fromIndex,
                                                      int toIndex)
        Specified by:
        subList in interface java.util.List<TsFileResource>