Class TopObjectTaskContainer
java.lang.Object
com._1c.g5.v8.dt.internal.compare.queue.TopObjectTaskContainer
Contains top-object comparison tasks within the queue.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addTask
(long id) Adds new (or replaces) task to the container.long
getId()
Returns the id of the top object this container represents.boolean
hasTask
(long id) Checks if the container contains the specified task.boolean
isEmpty()
Checks if the container is currently empty, that is, has no tasks.peek()
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.
-
Constructor Details
-
TopObjectTaskContainer
public TopObjectTaskContainer(long id) Constructs a top object task container.- Parameters:
id
- the top object id, notnull
-
-
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, notnull
-
isEmpty
public boolean isEmpty()Checks if the container is currently empty, that is, has no tasks.- Returns:
true
if the container is empty
-
pop
Pops a task from the container.- Returns:
- a task id or
null
if the container is empty
-
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, andfalse
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
-