程序包 weka.core

类 Queue

java.lang.Object
weka.core.Queue
所有已实现的接口:
Serializable, RevisionHandler

public class Queue extends Object implements Serializable, RevisionHandler
Class representing a FIFO queue.
版本:
$Revision: 1.10 $
作者:
Len Trigg (trigg@cs.waikato.ac.nz)
另请参阅:
  • 构造器详细资料

    • Queue

      public Queue()
  • 方法详细资料

    • removeAllElements

      public final void removeAllElements()
      Removes all objects from the queue m_Tail.m_Next.
    • push

      public Object push(Object item)
      Appends an object to the back of the queue.
      参数:
      item - the object to be appended
      返回:
      the object appended
    • pop

      public Object pop() throws RuntimeException
      Pops an object from the front of the queue.
      返回:
      the object at the front of the queue
      抛出:
      RuntimeException - if the queue is empty
    • peek

      public Object peek() throws RuntimeException
      Gets object from the front of the queue.
      返回:
      the object at the front of the queue
      抛出:
      RuntimeException - if the queue is empty
    • empty

      public boolean empty()
      Checks if queue is empty.
      返回:
      true if queue is empty
    • size

      public int size()
      Gets queue's size.
      返回:
      size of queue
    • toString

      public String toString()
      Produces textual description of queue.
      覆盖:
      toString 在类中 Object
      返回:
      textual description of queue
    • getRevision

      public String getRevision()
      Returns the revision string.
      指定者:
      getRevision 在接口中 RevisionHandler
      返回:
      the revision
    • main

      public static void main(String[] argv)
      Main method for testing this class.
      参数:
      argv - a set of strings that are pushed on a test queue