Class ProxyCollections


  • public class ProxyCollections
    extends Proxies
    Utility methods used by collection proxies.
    Author:
    Abe White
    • Constructor Detail

      • ProxyCollections

        public ProxyCollections()
    • Method Detail

      • beforeAdd

        public static void beforeAdd​(ProxyCollection coll,
                                     int index,
                                     java.lang.Object value)
        Call before invoking List.add(int,Object) on super.
      • beforeInsertElementAt

        public static void beforeInsertElementAt​(ProxyCollection coll,
                                                 java.lang.Object value,
                                                 int index)
        Call before invoking Vector.insertElementAt(Object,int) on super.
      • beforeAdd

        public static void beforeAdd​(ProxyCollection coll,
                                     java.lang.Object value)
        Call before invoking Collection.add(Object) on super.
      • afterAdd

        public static boolean afterAdd​(ProxyCollection coll,
                                       java.lang.Object value,
                                       boolean added)
        Call after invoking Collection.add(Object) on super.
        Parameters:
        added - whether the object was added
        Returns:
        added, for convenience
      • beforeAddElement

        public static void beforeAddElement​(ProxyCollection coll,
                                            java.lang.Object value)
        Call before invoking Vector.addElement(Object) on super.
      • afterAddElement

        public static void afterAddElement​(ProxyCollection coll,
                                           java.lang.Object value)
        Call after invoking Vector.addElement(Object) on super.
      • beforeAddFirst

        public static void beforeAddFirst​(ProxyCollection coll,
                                          java.lang.Object value)
        Call before invoking LinkedList.addFirst(Object) on super.
      • beforeAddLast

        public static void beforeAddLast​(ProxyCollection coll,
                                         java.lang.Object value)
        Call before invoking LinkedList.addLast(Object) on super.
      • afterAddLast

        public static void afterAddLast​(ProxyCollection coll,
                                        java.lang.Object value)
        Call after invoking LinkedList.addLast(Object) on super.
      • beforeOffer

        public static void beforeOffer​(ProxyCollection coll,
                                       java.lang.Object value)
        Call before invoking Queue#offer(Object) on super.
      • afterOffer

        public static boolean afterOffer​(ProxyCollection coll,
                                         java.lang.Object value,
                                         boolean added)
        Call after invoking Queue#offer(Object) on super.
        Parameters:
        added - whether the object was added
        Returns:
        added, for convenience
      • addAll

        public static boolean addAll​(ProxyCollection coll,
                                     int index,
                                     java.util.Collection values)
        Override for List.addAll(int, Collection).
      • addAll

        public static boolean addAll​(ProxyCollection coll,
                                     java.util.Collection values)
        Override for Collection.addAll(java.util.Collection<? extends E>).
      • beforeClear

        public static void beforeClear​(ProxyCollection coll)
        Call before clearing collection.
      • beforeRemoveAllElements

        public static void beforeRemoveAllElements​(ProxyCollection coll)
        Call before clearing vector.
      • afterIterator

        public static java.util.Iterator afterIterator​(ProxyCollection coll,
                                                       java.util.Iterator itr)
        Wrap given iterator in a proxy.
      • afterListIterator

        public static java.util.ListIterator afterListIterator​(ProxyCollection coll,
                                                               int idx,
                                                               java.util.ListIterator itr)
        Wrap given iterator in a proxy.
      • afterListIterator

        public static java.util.ListIterator afterListIterator​(ProxyCollection coll,
                                                               java.util.ListIterator itr)
        Wrap given iterator in a proxy.
      • beforeRemove

        public static void beforeRemove​(ProxyCollection coll,
                                        int index)
        Call before invoking List.remove(int) on super.
      • afterRemove

        public static java.lang.Object afterRemove​(ProxyCollection coll,
                                                   int index,
                                                   java.lang.Object removed)
        Call after invoking List.remove(int) on super.
        Parameters:
        removed - the removed object
        Returns:
        the removed object, for convenience
      • beforeRemoveElementAt

        public static void beforeRemoveElementAt​(ProxyCollection coll,
                                                 int index)
        Call before invoking Vector.removeElementAt(int) on super.
      • beforeRemove

        public static void beforeRemove​(ProxyCollection coll,
                                        java.lang.Object o)
        Call before invoking Collection.remove(java.lang.Object) on super.
      • afterRemove

        public static boolean afterRemove​(ProxyCollection coll,
                                          java.lang.Object o,
                                          boolean removed)
        Call after invoking Collection.remove(java.lang.Object) on super.
        Parameters:
        removed - whether the object was removed
        Returns:
        whether the object was removed, for convenience
      • beforeRemoveElement

        public static void beforeRemoveElement​(ProxyCollection coll,
                                               java.lang.Object o)
        Call before invoking Vector.removeElement(java.lang.Object) on super.
      • afterRemoveElement

        public static boolean afterRemoveElement​(ProxyCollection coll,
                                                 java.lang.Object o,
                                                 boolean removed)
        Call after invoking Vector.removeElement(java.lang.Object) on super.
      • beforeRemoveFirst

        public static void beforeRemoveFirst​(ProxyCollection coll)
        Call before invoking LinkedList.removeFirst() on super.
      • afterRemoveFirst

        public static java.lang.Object afterRemoveFirst​(ProxyCollection coll,
                                                        java.lang.Object removed)
        Call after invoking LinkedList.removeFirst() on super.
      • beforeRemoveLast

        public static void beforeRemoveLast​(ProxyCollection coll)
        Call after invoking LinkedList.removeLast() on super.
      • afterRemoveLast

        public static java.lang.Object afterRemoveLast​(ProxyCollection coll,
                                                       java.lang.Object removed)
        Call after invoking LinkedList.removeLast() on super.
      • beforeRemove

        public static void beforeRemove​(ProxyCollection coll)
        Call before invoking Queue#remove on super.
      • afterRemove

        public static java.lang.Object afterRemove​(ProxyCollection coll,
                                                   java.lang.Object removed)
        Call after invoking Queue#remove on super.
      • beforePoll

        public static void beforePoll​(ProxyCollection coll)
        Call before invoking Queue#poll on super.
      • afterPoll

        public static java.lang.Object afterPoll​(ProxyCollection coll,
                                                 java.lang.Object removed)
        Call after invoking Queue#poll on super.
      • removeAll

        public static boolean removeAll​(ProxyCollection coll,
                                        java.util.Collection<?> vals)
        Override for Collection.removeAll(java.util.Collection<?>).
      • retainAll

        public static boolean retainAll​(ProxyCollection coll,
                                        java.util.Collection<?> vals)
        Override for Collection.retainAll(java.util.Collection<?>).
      • beforeSet

        public static void beforeSet​(ProxyCollection coll,
                                     int index,
                                     java.lang.Object element)
        Call before invoking List.set(int, E) on super.
      • afterSet

        public static java.lang.Object afterSet​(ProxyCollection coll,
                                                int index,
                                                java.lang.Object element,
                                                java.lang.Object replaced)
        Call after invoking List.set(int, E) on super.
        Parameters:
        replaced - the replaced object
        Returns:
        the replaced object, for convenience
      • beforeSetElementAt

        public static void beforeSetElementAt​(ProxyCollection coll,
                                              java.lang.Object element,
                                              int index)
        Call before invoking Vector.setElementAt(E, int) on super.
      • afterSetElementAt

        public static java.lang.Object afterSetElementAt​(ProxyCollection coll,
                                                         java.lang.Object element,
                                                         int index,
                                                         java.lang.Object replaced)
        Call after invoking Vector.setElementAt(E, int) on super.
      • loadCollection

        public static void loadCollection​(ProxyCollection proxy)
      • loadCollection

        public static void loadCollection​(ProxyCollection proxy,
                                          boolean detaching)