Module qtjambi
Package io.qt.core

Class QQueue<T>

All Implemented Interfaces:
QtObjectInterface, Cloneable, Iterable<T>, Collection<T>, List<T>, Queue<T>

public class QQueue<T> extends QList<T> implements Queue<T>

Java wrapper for Qt class QQueue

  • Constructor Details

    • QQueue

      public QQueue(QMetaType metaType)
      Creating a container with given element type and size.

      See QQueue::QQueue()

      Parameters:
      metaType - the type T
    • QQueue

      public QQueue(QMetaType.Type metaType)
      Creating a container with given element type and size.

      See QQueue::QQueue()

      Parameters:
      metaType - the type T
    • QQueue

      public QQueue(Collection<T> other)
      Creating a container with given content.

      See QQueue::QQueue(const QQueue<T> &)

      Parameters:
      other - container
    • QQueue

      public QQueue(Class<T> elementType)
      Creating a container with given element type.

      See QQueue::QQueue()

      Parameters:
      elementType - the type T
  • Method Details

    • createVariantQueue

      public static QQueue<Object> createVariantQueue()
      Creating a container of type QVariant.
    • clone

      public QQueue<T> clone()
      Creates and returns a copy of this object.

      See QQueue::QQueue(const QQueue<T> &)

      Overrides:
      clone in class QList<T>
    • enqueue

      @QtUninvokable public final void enqueue(T t)
    • dequeue

      @QtUninvokable public final T dequeue()
    • head

      @QtUninvokable public final T head()
    • peek

      @QtUninvokable public final T peek()
      Specified by:
      peek in interface Queue<T>
      See Also:
    • poll

      @QtUninvokable public final T poll()
      Specified by:
      poll in interface Queue<T>
      See Also:
    • offer

      public final boolean offer(T e)
      Specified by:
      offer in interface Queue<T>
      See Also:
    • remove

      public final T remove()
      Specified by:
      remove in interface Queue<T>
      See Also:
    • element

      public final T element()
      Specified by:
      element in interface Queue<T>
      See Also:
    • of

      @SafeVarargs public static <T> QQueue<T> of(T element0, T... elements)
      Returns a QQueue containing given elements.
      Type Parameters:
      T - the QQueue's element type
      Parameters:
      element0 - the first element
      elements - subsequent elements
      Returns:
      a QQueue containing the specified element
      Throws:
      NullPointerException - if elements are null
    • addAll

      @QtUninvokable public final boolean addAll(Collection<? extends T> c)
      Appends all of the elements in the specified collection to the end of this list.
      Specified by:
      addAll in interface Collection<T>
      Specified by:
      addAll in interface List<T>
    • addAll

      @QtUninvokable public final boolean addAll(int index, Collection<? extends T> c)
      Inserts all of the elements in the specified collection into this list at the specified position.
      Specified by:
      addAll in interface List<T>
    • remove

      @QtUninvokable public final T remove(int index)
      Removes the element at the specified position in this list.
      Specified by:
      remove in interface List<T>
    • listIterator

      @QtUninvokable public final ListIterator<T> listIterator()
      Returns a list iterator over the elements in this list (in proper sequence).
      Specified by:
      listIterator in interface List<T>
    • listIterator

      @QtUninvokable public final ListIterator<T> listIterator(int index)
      Returns a list iterator over the elements in this list (in proper sequence), starting at the specified position in the list.
      Specified by:
      listIterator in interface List<T>
    • subList

      @QtUninvokable public final List<T> subList(int fromIndex, int toIndex)
      Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive. (If fromIndex and toIndex are equal, the returned list is empty.) The returned list is backed by this list, so non-structural changes in the returned list are reflected in this list, and vice-versa. The returned list supports all of the optional list operations supported by this list.
      Specified by:
      subList in interface List<T>
    • retainAll

      @QtUninvokable public final boolean retainAll(Collection<?> c)
      Retains only the elements in this list that are contained in the specified collection (optional operation). In other words, removes from this list all of its elements that are not contained in the specified collection.
      Specified by:
      retainAll in interface Collection<T>
      Specified by:
      retainAll in interface List<T>
    • toArray

      @QtUninvokable public final Object[] toArray()
      Returns an array containing all of the elements in this container.
      Specified by:
      toArray in interface Collection<T>
    • toArray

      @QtUninvokable public final <A> A[] toArray(A[] a)
      Returns an array containing all of the elements in this container.
      Specified by:
      toArray in interface Collection<T>
    • containsAll

      @QtUninvokable public final boolean containsAll(Collection<?> c)
      Returns true if this container contains all of the elements in the specified collection.
      Specified by:
      containsAll in interface Collection<T>
    • removeAll

      @QtUninvokable public final boolean removeAll(Collection<?> c)
      Removes all of this container elements that are also contained in the specified collection.
      Specified by:
      removeAll in interface Collection<T>
    • iterator

      @QtUninvokable public final Iterator<T> iterator()
      Returns an iterator over elements of type T.
      Specified by:
      iterator in interface Collection<T>
      Specified by:
      iterator in interface Iterable<T>
      Returns:
      an Iterator