Class QueryResults<T,​QR extends QueryResults>

    • Constructor Summary

      Constructors 
      Constructor Description
      QueryResults​(java.util.Collection<? extends T> results)  
      QueryResults​(java.util.Collection<? extends T> results, java.util.concurrent.ConcurrentMap<java.lang.String,​java.lang.Object> cache)  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean add​(T t)  
      boolean addAll​(@NonNull java.util.Collection<? extends T> c)  
      java.util.List<T> asList()
      Gets a list containing the same elements as the queries results.
      java.util.Set<T> asSet()
      Gets a set containing the same elements as the queries results.
      void clear()  
      boolean contains​(java.lang.Object o)  
      boolean containsAll​(@NonNull java.util.Collection<?> c)  
      T first()  
      T get​(int index)  
      int indexOf​(T o)  
      boolean isEmpty()  
      @NonNull java.util.Iterator<T> iterator()  
      T last()  
      int lastIndexOf​(T o)  
      QR limit​(int entries)
      Limits the results to the amount specified starting at index 0
      QR limit​(int startIndex, int amount)
      Limits the elements in the list to the amount specified starting at the start index
      java.util.ListIterator<T> listIterator()
      Deprecated.
      java.util.ListIterator<T> listIterator​(int index)
      Deprecated.
      T random()  
      boolean remove​(java.lang.Object o)  
      boolean removeAll​(@NonNull java.util.Collection<?> c)  
      boolean retainAll​(@NonNull java.util.Collection<?> c)  
      QR reverse()  
      QR shuffle()  
      int size()  
      QR sort​(java.util.Comparator<? super T> comparator)  
      @NonNull T[] toArray()  
      @NonNull T[] toArray​(@NonNull java.lang.Object[] array)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

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

        forEach
    • Constructor Detail

      • QueryResults

        public QueryResults​(java.util.Collection<? extends T> results)
      • QueryResults

        public QueryResults​(java.util.Collection<? extends T> results,
                            java.util.concurrent.ConcurrentMap<java.lang.String,​java.lang.Object> cache)
    • Method Detail

      • sort

        public final QR sort​(java.util.Comparator<? super T> comparator)
      • shuffle

        public final QR shuffle()
      • reverse

        public final QR reverse()
      • limit

        public final QR limit​(int entries)
        Limits the results to the amount specified starting at index 0
        Parameters:
        entries - the amount of entries to allow
      • limit

        public final QR limit​(int startIndex,
                              int amount)
        Limits the elements in the list to the amount specified starting at the start index
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<T>
      • isEmpty

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

        public boolean contains​(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection<T>
      • iterator

        @NonNull
        public @NonNull java.util.Iterator<T> iterator()
        Specified by:
        iterator in interface java.util.Collection<T>
        Specified by:
        iterator in interface java.lang.Iterable<T>
      • toArray

        @NonNull
        public @NonNull T[] toArray()
        Specified by:
        toArray in interface java.util.Collection<T>
      • toArray

        @NonNull
        public @NonNull T[] toArray​(@NonNull
                                    @NonNull java.lang.Object[] array)
        Specified by:
        toArray in interface java.util.Collection<T>
      • add

        public boolean add​(T t)
        Specified by:
        add in interface java.util.Collection<T>
      • remove

        public boolean remove​(java.lang.Object o)
        Specified by:
        remove in interface java.util.Collection<T>
      • containsAll

        public boolean containsAll​(@NonNull
                                   @NonNull java.util.Collection<?> c)
        Specified by:
        containsAll in interface java.util.Collection<T>
      • addAll

        public boolean addAll​(@NonNull
                              @NonNull java.util.Collection<? extends T> c)
        Specified by:
        addAll in interface java.util.Collection<T>
      • removeAll

        public boolean removeAll​(@NonNull
                                 @NonNull java.util.Collection<?> c)
        Specified by:
        removeAll in interface java.util.Collection<T>
      • retainAll

        public boolean retainAll​(@NonNull
                                 @NonNull java.util.Collection<?> c)
        Specified by:
        retainAll in interface java.util.Collection<T>
      • clear

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

        public T get​(int index)
      • first

        @Nullable
        public final T first()
      • last

        @Nullable
        public final T last()
      • random

        @Nullable
        public final T random()
      • indexOf

        public int indexOf​(T o)
      • lastIndexOf

        public int lastIndexOf​(T o)
      • listIterator

        @Deprecated
        public java.util.ListIterator<T> listIterator()
        Deprecated.
      • listIterator

        @Deprecated
        public java.util.ListIterator<T> listIterator​(int index)
        Deprecated.
      • asList

        public java.util.List<T> asList()
        Gets a list containing the same elements as the queries results.
      • asSet

        public java.util.Set<T> asSet()
        Gets a set containing the same elements as the queries results.
      • toString

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