Class PooledLinkedList<T>


  • public class PooledLinkedList<T>
    extends java.lang.Object
    A simple linked list that pools its nodes.
    • Constructor Summary

      Constructors 
      Constructor Description
      PooledLinkedList​(int maxPoolSize)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(T object)
      Adds the specified object to the end of the list regardless of iteration status
      void addFirst​(T object)
      Adds the specified object to the head of the list regardless of iteration status
      void clear()  
      void iter()
      Starts iterating over the list's items from the head of the list
      void iterReverse()
      Starts iterating over the list's items from the tail of the list
      T next()
      Gets the next item in the list
      T previous()
      Gets the previous item in the list
      void remove()
      Removes the current list item based on the iterator position.
      T removeLast()
      Removes the tail of the list regardless of iteration status
      int size()
      Returns the number of items in the list
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PooledLinkedList

        public PooledLinkedList​(int maxPoolSize)
    • Method Detail

      • add

        public void add​(T object)
        Adds the specified object to the end of the list regardless of iteration status
      • addFirst

        public void addFirst​(T object)
        Adds the specified object to the head of the list regardless of iteration status
      • size

        public int size()
        Returns the number of items in the list
      • iter

        public void iter()
        Starts iterating over the list's items from the head of the list
      • iterReverse

        public void iterReverse()
        Starts iterating over the list's items from the tail of the list
      • next

        @Null
        public T next()
        Gets the next item in the list
        Returns:
        the next item in the list or null if there are no more items
      • previous

        @Null
        public T previous()
        Gets the previous item in the list
        Returns:
        the previous item in the list or null if there are no more items
      • remove

        public void remove()
        Removes the current list item based on the iterator position.
      • removeLast

        @Null
        public T removeLast()
        Removes the tail of the list regardless of iteration status
      • clear

        public void clear()