Class RexProgramFuzzyTest.TopN<E extends java.lang.Comparable<E>>

  • Type Parameters:
    E - the type of elements held in this collection
    All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.Queue<E>
    Enclosing class:
    RexProgramFuzzyTest

    private static class RexProgramFuzzyTest.TopN<E extends java.lang.Comparable<E>>
    extends java.util.PriorityQueue<E>
    A bounded variation of PriorityQueue
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int n  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private TopN​(int n)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Iterator<E> iterator()  
      boolean offer​(E o)  
      • Methods inherited from class java.util.PriorityQueue

        add, clear, comparator, contains, forEach, peek, poll, remove, removeAll, removeIf, retainAll, size, spliterator, toArray, toArray
      • Methods inherited from class java.util.AbstractQueue

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

        containsAll, isEmpty, 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

        containsAll, equals, hashCode, isEmpty, parallelStream, stream, toArray
    • Field Detail

      • n

        private final int n
    • Constructor Detail

      • TopN

        private TopN​(int n)
    • Method Detail

      • offer

        public boolean offer​(E o)
        Specified by:
        offer in interface java.util.Queue<E extends java.lang.Comparable<E>>
        Overrides:
        offer in class java.util.PriorityQueue<E extends java.lang.Comparable<E>>
      • iterator

        public java.util.Iterator<E> iterator()
        Specified by:
        iterator in interface java.util.Collection<E extends java.lang.Comparable<E>>
        Specified by:
        iterator in interface java.lang.Iterable<E extends java.lang.Comparable<E>>
        Overrides:
        iterator in class java.util.PriorityQueue<E extends java.lang.Comparable<E>>