X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=statesystem%2Forg.eclipse.tracecompass.statesystem.core%2Fsrc%2Forg%2Feclipse%2Ftracecompass%2Finternal%2Fstatesystem%2Fcore%2Fbackend%2Fhistorytree%2FParentNode.java;fp=statesystem%2Forg.eclipse.tracecompass.statesystem.core%2Fsrc%2Forg%2Feclipse%2Ftracecompass%2Finternal%2Fstatesystem%2Fcore%2Fbackend%2Fhistorytree%2FParentNode.java;h=15003bdf4a1b204021c43e54965dae8f242172ab;hb=88598bff4fde87a46ad5d634967bc051e7c4385c;hp=34b798d6e3d7892d6106c393d87325d40906634e;hpb=441a6e7fa14cd9ed8a0aeafead9a2f379fd67e30;p=deliverable%2Ftracecompass.git diff --git a/statesystem/org.eclipse.tracecompass.statesystem.core/src/org/eclipse/tracecompass/internal/statesystem/core/backend/historytree/ParentNode.java b/statesystem/org.eclipse.tracecompass.statesystem.core/src/org/eclipse/tracecompass/internal/statesystem/core/backend/historytree/ParentNode.java index 34b798d6e3..15003bdf4a 100644 --- a/statesystem/org.eclipse.tracecompass.statesystem.core/src/org/eclipse/tracecompass/internal/statesystem/core/backend/historytree/ParentNode.java +++ b/statesystem/org.eclipse.tracecompass.statesystem.core/src/org/eclipse/tracecompass/internal/statesystem/core/backend/historytree/ParentNode.java @@ -9,6 +9,10 @@ package org.eclipse.tracecompass.internal.statesystem.core.backend.historytree; +import java.util.Collection; +import org.eclipse.jdt.annotation.NonNull; +import org.eclipse.tracecompass.statesystem.core.exceptions.TimeRangeException; + /** * A Core node is a first-level node of a History Tree which is not a leaf node. * @@ -67,13 +71,6 @@ public abstract class ParentNode extends HTNode { */ public abstract long getChildStart(int index); - /** - * Get the start time of the latest (right-most) child node. - * - * @return The start time of the latest child - */ - public abstract long getLatestChildStart(); - /** * Tell this node that it has a new child (Congrats!) * @@ -82,4 +79,18 @@ public abstract class ParentNode extends HTNode { */ public abstract void linkNewChild(HTNode childNode); + /** + * Inner method to select the sequence numbers for the children of the + * current node that intersect the given timestamp. Useful for moving down + * the tree. + * + * @param t + * The timestamp to choose which child is the next one + * @return Collection of sequence numbers of the child nodes that intersect + * t, non-null empty collection if this is a Leaf Node + * @throws TimeRangeException + * If t is out of the node's range + */ + public abstract @NonNull Collection<@NonNull Integer> selectNextChildren(long t); + }