Class ChildNodeFinder

java.lang.Object
org.opentrafficsim.editor.ChildNodeFinder

public class ChildNodeFinder extends Object
Checks whether a child node is present, and if so can return it, in an efficient manner.

Copyright (c) 2024-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Wouter Schakel
  • Constructor Details

    • ChildNodeFinder

      public ChildNodeFinder(XsdTreeNode parent)
      Constructor.
      Parameters:
      parent - parent node
  • Method Details

    • hasChild

      public boolean hasChild(String name)
      Whether the node has given child.
      Parameters:
      name - child name
      Returns:
      whether the node has given child
    • hasActiveChild

      public boolean hasActiveChild(String name)
      Whether the node has given child which is also active.
      Parameters:
      name - child name
      Returns:
      whether the node has given child which is also active
    • get

      public XsdTreeNode get()
      Returns the previously found node.
      Returns:
      previously found node