Class LazyLoadItemList.BufferedPage<T>

  • Enclosing class:
    LazyLoadItemList<E>

    protected static class LazyLoadItemList.BufferedPage<T>
    extends java.lang.Object
    Thread safe (hopefully) abstraction for paged result objects list with information at which index this page starts. Also has functionality of checking if given global index 'is in scope' of current LazyLoadItemList.BufferedPage.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected BufferedPage​(java.util.List<T> buffer, int pageStartPosition)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean isBufferValid​(int globalposition)
      Returns true if given globalposiotion could be retrieved for the current page.
      boolean isEmpty()  
      protected int size()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • BufferedPage

        protected BufferedPage​(java.util.List<T> buffer,
                               int pageStartPosition)
    • Method Detail

      • size

        protected int size()
      • isEmpty

        public boolean isEmpty()
      • isBufferValid

        protected boolean isBufferValid​(int globalposition)
        Returns true if given globalposiotion could be retrieved for the current page. This is fullilled if the page is not null and globalposition is in relative range of current page.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object