Class NodeStateUtils


  • public final class NodeStateUtils
    extends java.lang.Object
    Utility method for code that deals with node states.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static @NotNull NodeState getNode​(@NotNull NodeState node, @NotNull java.lang.String path)
      Get a possibly non existing child node of a node.
      static @Nullable java.lang.String getPrimaryTypeName​(NodeState nodeState)  
      static boolean isHidden​(@NotNull java.lang.String name)
      Check whether the node or property with the given name is hidden, that is, if the node name starts with a ":".
      static boolean isHiddenPath​(@NotNull java.lang.String path)
      Check whether the given path contains a hidden node.
      static java.lang.String toString​(NodeState node)
      Provides a string representation of the given node state
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isHidden

        public static boolean isHidden​(@NotNull
                                       @NotNull java.lang.String name)
        Check whether the node or property with the given name is hidden, that is, if the node name starts with a ":".
        Parameters:
        name - the node or property name
        Returns:
        true if the item is hidden
      • isHiddenPath

        public static boolean isHiddenPath​(@NotNull
                                           @NotNull java.lang.String path)
        Check whether the given path contains a hidden node.
        Parameters:
        path - the path
        Returns:
        true if one of the nodes is hidden
      • getPrimaryTypeName

        @Nullable
        public static @Nullable java.lang.String getPrimaryTypeName​(NodeState nodeState)
      • getNode

        @NotNull
        public static @NotNull NodeState getNode​(@NotNull
                                                 @NotNull NodeState node,
                                                 @NotNull
                                                 @NotNull java.lang.String path)
        Get a possibly non existing child node of a node.
        Parameters:
        node - node whose child node to get
        path - path of the child node
        Returns:
        child node of node at path.
      • toString

        public static java.lang.String toString​(NodeState node)
        Provides a string representation of the given node state
        Parameters:
        node - node state
        Returns:
        a string representation of node.