Class NoDuplicatesQueue

  • All Implemented Interfaces:
    Queue4

    public class NoDuplicatesQueue
    extends java.lang.Object
    implements Queue4
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.lang.Object obj)  
      boolean hasNext()  
      Iterator4 iterator()  
      java.lang.Object next()  
      java.lang.Object nextMatching​(Predicate4 condition)
      Returns the next object in the queue that matches the specified condition.
      • Methods inherited from class java.lang.Object

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

      • NoDuplicatesQueue

        public NoDuplicatesQueue​(Queue4 queue)
    • Method Detail

      • add

        public void add​(java.lang.Object obj)
        Specified by:
        add in interface Queue4
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface Queue4
      • next

        public java.lang.Object next()
        Specified by:
        next in interface Queue4
      • nextMatching

        public java.lang.Object nextMatching​(Predicate4 condition)
        Description copied from interface: Queue4
        Returns the next object in the queue that matches the specified condition. The operation is always NON-BLOCKING.
        Specified by:
        nextMatching in interface Queue4
        Parameters:
        condition - the object must satisfy to be returned
        Returns:
        the object satisfying the condition or null if none does