Class TopObjectTaskContainer

java.lang.Object
com._1c.g5.v8.dt.internal.compare.queue.TopObjectTaskContainer

public class TopObjectTaskContainer extends Object
Contains top-object comparison tasks within the queue.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a top object task container.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addTask(long id)
    Adds new (or replaces) task to the container.
    long
    Returns the id of the top object this container represents.
    boolean
    hasTask(long id)
    Checks if the container contains the specified task.
    boolean
    Checks if the container is currently empty, that is, has no tasks.
    Peeks to the top of the queue.
    pop()
    Pops a task from the container.
    void
    prioritizeTask(long id)
    Prioritizes the specified task in the list of task of this container.
    void
    removeTask(long id)
    Removes the specified task from the container.

    Methods inherited from class java.lang.Object

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

    • TopObjectTaskContainer

      public TopObjectTaskContainer(long id)
      Constructs a top object task container.
      Parameters:
      id - the top object id, not null
  • Method Details

    • addTask

      public void addTask(long id)
      Adds new (or replaces) task to the container.
      Parameters:
      id - The comparison node identifier to add as a task, not null
    • isEmpty

      public boolean isEmpty()
      Checks if the container is currently empty, that is, has no tasks.
      Returns:
      true if the container is empty
    • pop

      public Long pop()
      Pops a task from the container.
      Returns:
      a task id or null if the container is empty
    • peek

      public Long peek()
      Peeks to the top of the queue.
      Returns:
      The comparison task at the top of the queue.
    • removeTask

      public void removeTask(long id)
      Removes the specified task from the container.
      Parameters:
      id - the task id
    • hasTask

      public boolean hasTask(long id)
      Checks if the container contains the specified task.
      Parameters:
      id - the task id
      Returns:
      true if the container contains the specified task, and false otherwise
    • getId

      public long getId()
      Returns the id of the top object this container represents.
      Returns:
      the top object id, not null
    • prioritizeTask

      public void prioritizeTask(long id)
      Prioritizes the specified task in the list of task of this container.
      Parameters:
      id - the id of the task to prioritize