Class BoundedBuffer<T>

  • All Implemented Interfaces:
    Buffer<T>

    public final class BoundedBuffer<T>
    extends java.lang.Object
    implements Buffer<T>
    INTERNAL API
    • Constructor Detail

      • BoundedBuffer

        public BoundedBuffer​(int capacity)
    • Method Detail

      • capacity

        public int capacity()
        Specified by:
        capacity in interface Buffer<T>
      • clear

        public void clear()
        Specified by:
        clear in interface Buffer<T>
      • dequeue

        public T dequeue()
        Specified by:
        dequeue in interface Buffer<T>
      • dropHead

        public void dropHead()
        Specified by:
        dropHead in interface Buffer<T>
      • dropTail

        public void dropTail()
        Specified by:
        dropTail in interface Buffer<T>
      • enqueue

        public void enqueue​(T elem)
        Specified by:
        enqueue in interface Buffer<T>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface Buffer<T>
      • isFull

        public boolean isFull()
        Specified by:
        isFull in interface Buffer<T>
      • nonEmpty

        public boolean nonEmpty()
        Specified by:
        nonEmpty in interface Buffer<T>
      • peek

        public T peek()
        Specified by:
        peek in interface Buffer<T>
      • used

        public int used()
        Specified by:
        used in interface Buffer<T>