Class BaseLinkedQueue<E>

    • Constructor Summary

      Constructors 
      Constructor Description
      BaseLinkedQueue()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isEmpty()

      java.util.Iterator<E> iterator()  
      int size()

      • Methods inherited from class java.util.AbstractQueue

        add, addAll, clear, element, remove
      • Methods inherited from class java.util.AbstractCollection

        contains, containsAll, remove, removeAll, retainAll, toArray, toArray, toString
      • Methods inherited from class java.lang.Object

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

        contains, containsAll, equals, hashCode, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.Queue

        offer, peek, poll
    • Field Detail

      • p00

        long p00
      • p01

        long p01
      • p02

        long p02
      • p03

        long p03
      • p04

        long p04
      • p05

        long p05
      • p06

        long p06
      • p07

        long p07
      • p30

        long p30
      • p31

        long p31
      • p32

        long p32
      • p33

        long p33
      • p34

        long p34
      • p35

        long p35
      • p36

        long p36
      • p37

        long p37
    • Constructor Detail

      • BaseLinkedQueue

        BaseLinkedQueue()
    • Method Detail

      • iterator

        public final java.util.Iterator<E> iterator()
        Specified by:
        iterator in interface java.util.Collection<E>
        Specified by:
        iterator in interface java.lang.Iterable<E>
        Specified by:
        iterator in class java.util.AbstractCollection<E>
      • size

        public final int size()

        IMPLEMENTATION NOTES:
        This is an O(n) operation as we run through all the nodes and count them.

        Specified by:
        size in interface java.util.Collection<E>
        Specified by:
        size in class java.util.AbstractCollection<E>
        See Also:
        Collection.size()
      • isEmpty

        public final boolean isEmpty()

        IMPLEMENTATION NOTES:
        Queue is empty when producerNode is the same as consumerNode. An alternative implementation would be to observe the producerNode.value is null, which also means an empty queue because only the consumerNode.value is allowed to be null.

        Specified by:
        isEmpty in interface java.util.Collection<E>
        Overrides:
        isEmpty in class java.util.AbstractCollection<E>
        See Also:
        MessagePassingQueue.isEmpty()