Class MultiviewSet.PrioritisedView

  • Enclosing class:
    MultiviewSet<T>

    public final class MultiviewSet.PrioritisedView
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.concurrent.PriorityBlockingQueue<T> myQueue  
    • Constructor Summary

      Constructors 
      Constructor Description
      PrioritisedView​(java.util.Set<T> initial, java.util.Comparator<? super T> comparator)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) boolean add​(T entry)  
      (package private) void clear()  
      boolean isEmpty()  
      void offer​(T entry)
      The entry is also added to the common Set and therefore to all views backed by it.
      T poll()  
      (package private) boolean remove​(java.lang.Object entry)  
      int size()  
      • Methods inherited from class java.lang.Object

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

      • myQueue

        private final java.util.concurrent.PriorityBlockingQueue<T> myQueue
    • Constructor Detail

      • PrioritisedView

        PrioritisedView​(java.util.Set<T> initial,
                        java.util.Comparator<? super T> comparator)
    • Method Detail

      • isEmpty

        public boolean isEmpty()
      • offer

        public void offer​(T entry)
        The entry is also added to the common Set and therefore to all views backed by it.
      • poll

        public T poll()
        Returns:
        The highest priority item (that also existed in the backing Set)
      • size

        public int size()
      • add

        boolean add​(T entry)
      • clear

        void clear()
      • remove

        boolean remove​(java.lang.Object entry)