Package soot.util

Class EmptyChain<T>

    • Constructor Detail

      • EmptyChain

        public EmptyChain()
    • Method Detail

      • toArray

        public <X> X[] toArray​(X[] a)
        Specified by:
        toArray in interface Collection<T>
      • add

        public boolean add​(T e)
        Specified by:
        add in interface Collection<T>
      • insertBefore

        public void insertBefore​(List<T> toInsert,
                                 T point)
        Description copied from interface: Chain
        Inserts toInsert in the Chain before point.
        Specified by:
        insertBefore in interface Chain<T>
      • insertAfter

        public void insertAfter​(List<T> toInsert,
                                T point)
        Description copied from interface: Chain
        Inserts toInsert in the Chain after point.
        Specified by:
        insertAfter in interface Chain<T>
      • insertAfter

        public void insertAfter​(T toInsert,
                                T point)
        Description copied from interface: Chain
        Inserts toInsert in the Chain after point.
        Specified by:
        insertAfter in interface Chain<T>
      • insertBefore

        public void insertBefore​(T toInsert,
                                 T point)
        Description copied from interface: Chain
        Inserts toInsert in the Chain before point.
        Specified by:
        insertBefore in interface Chain<T>
      • insertBefore

        public void insertBefore​(Chain<T> toInsert,
                                 T point)
        Description copied from interface: Chain
        Inserts toInsert in the Chain before point.
        Specified by:
        insertBefore in interface Chain<T>
      • insertAfter

        public void insertAfter​(Chain<T> toInsert,
                                T point)
        Description copied from interface: Chain
        Inserts toInsert in the Chain after point.
        Specified by:
        insertAfter in interface Chain<T>
      • swapWith

        public void swapWith​(T out,
                             T in)
        Description copied from interface: Chain
        Replaces out in the Chain by in.
        Specified by:
        swapWith in interface Chain<T>
      • remove

        public boolean remove​(Object u)
        Description copied from interface: Chain
        Removes the given object from this Chain. Parameter has to be of type Object to be compatible with the Collection interface.
        Specified by:
        remove in interface Chain<T>
        Specified by:
        remove in interface Collection<T>
      • addFirst

        public void addFirst​(T u)
        Description copied from interface: Chain
        Adds the given object at the beginning of the Chain.
        Specified by:
        addFirst in interface Chain<T>
      • addLast

        public void addLast​(T u)
        Description copied from interface: Chain
        Adds the given object at the end of the Chain.
        Specified by:
        addLast in interface Chain<T>
      • removeFirst

        public void removeFirst()
        Description copied from interface: Chain
        Removes the first object contained in this Chain.
        Specified by:
        removeFirst in interface Chain<T>
      • removeLast

        public void removeLast()
        Description copied from interface: Chain
        Removes the last object contained in this Chain.
        Specified by:
        removeLast in interface Chain<T>
      • follows

        public boolean follows​(T someObject,
                               T someReferenceObject)
        Description copied from interface: Chain
        Returns true if object someObject follows object someReferenceObject in the Chain, i.e. someReferenceObject comes first and then someObject.
        Specified by:
        follows in interface Chain<T>
      • getFirst

        public T getFirst()
        Description copied from interface: Chain
        Returns the first object in this Chain.
        Specified by:
        getFirst in interface Chain<T>
      • getLast

        public T getLast()
        Description copied from interface: Chain
        Returns the last object in this Chain.
        Specified by:
        getLast in interface Chain<T>
      • getSuccOf

        public T getSuccOf​(T point)
        Description copied from interface: Chain
        Returns the object immediately following point.
        Specified by:
        getSuccOf in interface Chain<T>
      • getPredOf

        public T getPredOf​(T point)
        Description copied from interface: Chain
        Returns the object immediately preceding point.
        Specified by:
        getPredOf in interface Chain<T>
      • snapshotIterator

        public Iterator<T> snapshotIterator()
        Description copied from interface: Chain
        Returns an iterator over a copy of this chain. This avoids ConcurrentModificationExceptions from being thrown if the underlying Chain is modified during iteration. Do not use this to remove elements which have not yet been iterated over!
        Specified by:
        snapshotIterator in interface Chain<T>
      • iterator

        public Iterator<T> iterator​(T u)
        Description copied from interface: Chain
        Returns an iterator over this Chain, starting at the given object.
        Specified by:
        iterator in interface Chain<T>
      • iterator

        public Iterator<T> iterator​(T head,
                                    T tail)
        Description copied from interface: Chain
        Returns an iterator over this Chain, starting at head and reaching tail (inclusive).
        Specified by:
        iterator in interface Chain<T>
      • size

        public int size()
        Description copied from interface: Chain
        Returns the size of this Chain.
        Specified by:
        size in interface Chain<T>
        Specified by:
        size in interface Collection<T>
      • getModificationCount

        public long getModificationCount()
        Description copied from interface: Chain
        Returns the number of times this chain has been modified.
        Specified by:
        getModificationCount in interface Chain<T>
      • getElementsUnsorted

        public Collection<T> getElementsUnsorted()
        Description copied from interface: Chain
        Gets all elements in the chain. There is no guarantee on sorting. On the other hand, the collection returned by this method is thread-safe. You can iterate over it even in the case of concurrent modifications to the underlying chain.
        Specified by:
        getElementsUnsorted in interface Chain<T>
        Returns:
        All elements in the chain in an unsorted collection
      • insertAfter

        public void insertAfter​(Collection<? extends T> toInsert,
                                T point)
        Description copied from interface: Chain
        Inserts toInsert in the Chain after point.
        Specified by:
        insertAfter in interface Chain<T>
      • insertBefore

        public void insertBefore​(Collection<? extends T> toInsert,
                                 T point)
        Description copied from interface: Chain
        Inserts toInsert in the Chain before point.
        Specified by:
        insertBefore in interface Chain<T>