Interface BufferList<T>

  • All Superinterfaces:
    java.util.Collection<T>, java.lang.Iterable<T>
    All Known Subinterfaces:
    ExtendedBufferList<T>

    public interface BufferList<T>
    extends java.util.Collection<T>
    Since:
    3.0
    Version:
    3.0
    Author:
    Evren Sirin
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean add​(T stmt)
      Adds an element to this buffer list.
      boolean addAll​(BufferList<T> theElement)
      Adds the contents of another buffer list to this one.
      <E extends T>
      E[]
      array()
      Returns the array which stores the contents of this buffer list.
      int capacity()  
      void clear()  
      T getAt​(int index)  
      boolean isEmpty()  
      boolean isFull()  
      com.google.common.collect.PeekingIterator<T> iterator()  
      int size()
      Returns the actual number of elements in the buffer list.
      BufferList<T> sort​(java.util.Comparator<? super T> theComparator)  
      void truncate​(int size)  
      • Methods inherited from interface java.util.Collection

        addAll, contains, containsAll, equals, hashCode, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
    • Method Detail

      • add

        boolean add​(T stmt)
        Adds an element to this buffer list.
        Specified by:
        add in interface java.util.Collection<T>
        Parameters:
        stmt -
        Returns:
        true if the buffer list reached its maximum capacity
      • addAll

        boolean addAll​(BufferList<T> theElement)
        Adds the contents of another buffer list to this one.
        Parameters:
        theElement -
        Returns:
        true if the buffer list reached its maximum capacity
      • isEmpty

        boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection<T>
      • isFull

        boolean isFull()
      • iterator

        com.google.common.collect.PeekingIterator<T> iterator()
        Specified by:
        iterator in interface java.util.Collection<T>
        Specified by:
        iterator in interface java.lang.Iterable<T>
      • clear

        void clear()
        Specified by:
        clear in interface java.util.Collection<T>
      • truncate

        void truncate​(int size)
      • array

        <E extends T> E[] array()
        Returns the array which stores the contents of this buffer list. Length of the array can be greater than the number of stored elements.
        Returns:
      • size

        int size()
        Returns the actual number of elements in the buffer list.
        Specified by:
        size in interface java.util.Collection<T>
        Returns:
      • capacity

        int capacity()
      • sort

        BufferList<T> sort​(java.util.Comparator<? super T> theComparator)
      • getAt

        T getAt​(int index)