1 /*******************************************************************************
2 * Copyright (c) 2010, 2016 Ericsson, École Polytechnique de Montréal, and others
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *******************************************************************************/
10 package org
.eclipse
.tracecompass
.internal
.statesystem
.core
.backend
.historytree
;
12 import java
.util
.Collection
;
13 import org
.eclipse
.jdt
.annotation
.NonNull
;
14 import org
.eclipse
.tracecompass
.statesystem
.core
.exceptions
.TimeRangeException
;
17 * A Core node is a first-level node of a History Tree which is not a leaf node.
19 * It extends HTNode by adding support for child nodes, and also extensions.
21 * @author Alexandre Montplaisir
22 * @author Florian Wininger
24 public abstract class ParentNode
extends HTNode
{
27 * Initial constructor. Use this to initialize a new EMPTY node.
30 * Configuration of the History Tree
32 * The (unique) sequence number assigned to this particular node
33 * @param parentSeqNumber
34 * The sequence number of this node's parent node
36 * The earliest timestamp stored in this node
38 public ParentNode(HTConfig config
, int seqNumber
, int parentSeqNumber
,
40 super(config
, seqNumber
, parentSeqNumber
, start
);
44 * Return the number of child nodes this node has.
46 * @return The number of child nodes
48 public abstract int getNbChildren();
51 * Get the child node corresponding to the specified index
53 * @param index The index of the child to lookup
54 * @return The child node
56 public abstract int getChild(int index
);
59 * Get the latest (right-most) child node of this node.
61 * @return The latest child node
63 public abstract int getLatestChild();
66 * Get the start time of the specified child node.
69 * The index of the child node
70 * @return The start time of the that child node.
72 public abstract long getChildStart(int index
);
75 * Tell this node that it has a new child (Congrats!)
78 * The SHTNode object of the new child
80 public abstract void linkNewChild(HTNode childNode
);
83 * Inner method to select the sequence numbers for the children of the
84 * current node that intersect the given timestamp. Useful for moving down
88 * The timestamp to choose which child is the next one
89 * @return Collection of sequence numbers of the child nodes that intersect
90 * t, non-null empty collection if this is a Leaf Node
91 * @throws TimeRangeException
92 * If t is out of the node's range
94 public abstract @NonNull Collection
<@NonNull Integer
> selectNextChildren(long t
);
This page took 0.032599 seconds and 5 git commands to generate.