Class ActivatableStack<E>

  • All Implemented Interfaces:
    ActivatableCollection<E>, ActivatableList<E>, Activatable, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>, java.util.RandomAccess

    public class ActivatableStack<E>
    extends java.util.Stack<E>
    implements ActivatableList<E>
    extends Stack with Transparent Activation and Transparent Persistence support.
    Since:
    7.9
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class java.util.Vector

        capacityIncrement, elementCount, elementData
      • Fields inherited from class java.util.AbstractList

        modCount
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void activate​(ActivationPurpose purpose)
      Should be called by every reading field access of an object.
      void add​(int index, E element)  
      boolean add​(E e)  
      boolean addAll​(int index, java.util.Collection<? extends E> c)  
      boolean addAll​(java.util.Collection<? extends E> c)  
      void bind​(Activator activator)
      Called by db4o after the object instantiation.
      void clear()  
      java.lang.Object clone()  
      boolean contains​(java.lang.Object o)  
      boolean containsAll​(java.util.Collection<?> c)  
      boolean empty()  
      boolean equals​(java.lang.Object o)  
      E get​(int index)  
      int hashCode()  
      int indexOf​(java.lang.Object o)  
      boolean isEmpty()  
      java.util.Iterator<E> iterator()  
      int lastIndexOf​(java.lang.Object o)  
      java.util.ListIterator<E> listIterator()  
      java.util.ListIterator<E> listIterator​(int index)  
      E peek()  
      E pop()  
      E push​(E item)  
      E remove​(int index)  
      boolean remove​(java.lang.Object o)  
      boolean removeAll​(java.util.Collection<?> c)  
      protected void removeRange​(int fromIndex, int toIndex)  
      int search​(java.lang.Object o)  
      E set​(int index, E element)  
      int size()  
      java.util.List<E> subList​(int fromIndex, int toIndex)  
      java.lang.Object[] toArray()  
      <T> T[] toArray​(T[] a)  
      • Methods inherited from class java.util.Vector

        addElement, capacity, copyInto, elementAt, elements, ensureCapacity, firstElement, forEach, indexOf, insertElementAt, lastElement, lastIndexOf, removeAllElements, removeElement, removeElementAt, removeIf, replaceAll, retainAll, setElementAt, setSize, sort, spliterator, toString, trimToSize
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.List

        replaceAll, retainAll, sort, spliterator
    • Constructor Detail

      • ActivatableStack

        public ActivatableStack()
    • Method Detail

      • bind

        public void bind​(Activator activator)
        Description copied from interface: Activatable
        Called by db4o after the object instantiation. This method is called to bind the object to the current activator

        The recommended implementation of this method is to store the passed Activator in a transient field of the object.
        Specified by:
        bind in interface Activatable
        Parameters:
        activator - the Activator instance to bind
      • add

        public boolean add​(E e)
        Specified by:
        add in interface java.util.Collection<E>
        Specified by:
        add in interface java.util.List<E>
        Overrides:
        add in class java.util.Vector<E>
      • add

        public void add​(int index,
                        E element)
        Specified by:
        add in interface java.util.List<E>
        Overrides:
        add in class java.util.Vector<E>
      • addAll

        public boolean addAll​(java.util.Collection<? extends E> c)
        Specified by:
        addAll in interface java.util.Collection<E>
        Specified by:
        addAll in interface java.util.List<E>
        Overrides:
        addAll in class java.util.Vector<E>
      • addAll

        public boolean addAll​(int index,
                              java.util.Collection<? extends E> c)
        Specified by:
        addAll in interface java.util.List<E>
        Overrides:
        addAll in class java.util.Vector<E>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<E>
        Specified by:
        clear in interface java.util.List<E>
        Overrides:
        clear in class java.util.Vector<E>
      • clone

        public java.lang.Object clone()
        Overrides:
        clone in class java.util.Vector<E>
      • contains

        public boolean contains​(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection<E>
        Specified by:
        contains in interface java.util.List<E>
        Overrides:
        contains in class java.util.Vector<E>
      • containsAll

        public boolean containsAll​(java.util.Collection<?> c)
        Specified by:
        containsAll in interface java.util.Collection<E>
        Specified by:
        containsAll in interface java.util.List<E>
        Overrides:
        containsAll in class java.util.Vector<E>
      • equals

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

        public boolean empty()
        Overrides:
        empty in class java.util.Stack<E>
      • get

        public E get​(int index)
        Specified by:
        get in interface java.util.List<E>
        Overrides:
        get in class java.util.Vector<E>
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Collection<E>
        Specified by:
        hashCode in interface java.util.List<E>
        Overrides:
        hashCode in class java.util.Vector<E>
      • indexOf

        public int indexOf​(java.lang.Object o)
        Specified by:
        indexOf in interface java.util.List<E>
        Overrides:
        indexOf in class java.util.Vector<E>
      • iterator

        public java.util.Iterator<E> iterator()
        Specified by:
        iterator in interface java.util.Collection<E>
        Specified by:
        iterator in interface java.lang.Iterable<E>
        Specified by:
        iterator in interface java.util.List<E>
        Overrides:
        iterator in class java.util.Vector<E>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection<E>
        Specified by:
        isEmpty in interface java.util.List<E>
        Overrides:
        isEmpty in class java.util.Vector<E>
      • lastIndexOf

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

        public java.util.ListIterator<E> listIterator()
        Specified by:
        listIterator in interface java.util.List<E>
        Overrides:
        listIterator in class java.util.Vector<E>
      • listIterator

        public java.util.ListIterator<E> listIterator​(int index)
        Specified by:
        listIterator in interface java.util.List<E>
        Overrides:
        listIterator in class java.util.Vector<E>
      • remove

        public E remove​(int index)
        Specified by:
        remove in interface java.util.List<E>
        Overrides:
        remove in class java.util.Vector<E>
      • remove

        public boolean remove​(java.lang.Object o)
        Specified by:
        remove in interface java.util.Collection<E>
        Specified by:
        remove in interface java.util.List<E>
        Overrides:
        remove in class java.util.Vector<E>
      • removeRange

        protected void removeRange​(int fromIndex,
                                   int toIndex)
        Overrides:
        removeRange in class java.util.Vector<E>
      • set

        public E set​(int index,
                     E element)
        Specified by:
        set in interface java.util.List<E>
        Overrides:
        set in class java.util.Vector<E>
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<E>
        Specified by:
        size in interface java.util.List<E>
        Overrides:
        size in class java.util.Vector<E>
      • search

        public int search​(java.lang.Object o)
        Overrides:
        search in class java.util.Stack<E>
      • subList

        public java.util.List<E> subList​(int fromIndex,
                                         int toIndex)
        Specified by:
        subList in interface java.util.List<E>
        Overrides:
        subList in class java.util.Vector<E>
      • toArray

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

        public <T> T[] toArray​(T[] a)
        Specified by:
        toArray in interface java.util.Collection<E>
        Specified by:
        toArray in interface java.util.List<E>
        Overrides:
        toArray in class java.util.Vector<E>
      • removeAll

        public boolean removeAll​(java.util.Collection<?> c)
        Specified by:
        removeAll in interface java.util.Collection<E>
        Specified by:
        removeAll in interface java.util.List<E>
        Overrides:
        removeAll in class java.util.Vector<E>
      • push

        public E push​(E item)
        Overrides:
        push in class java.util.Stack<E>
      • pop

        public E pop()
        Overrides:
        pop in class java.util.Stack<E>
      • peek

        public E peek()
        Overrides:
        peek in class java.util.Stack<E>