Interface NbtVisitor


public interface NbtVisitor
A visitor that can enumerate a NBT tree structure.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    visit(NbtBase<?> node)
    Visit a leaf node, which is a NBT tag with a primitive or String value.
    boolean
    Begin visiting a compound node that contains multiple child nodes of different types.
    boolean
    Begin visiting a list node that contains multiple child nodes of the same type.
    boolean
    Stop visiting a compound node.
    boolean
    Stop visiting a list node.
  • Method Details

    • visit

      boolean visit(NbtBase<?> node)
      Visit a leaf node, which is a NBT tag with a primitive or String value.
      Parameters:
      node - - the visited leaf node.
      Returns:
      TRUE to continue visiting children at this level, FALSE otherwise.
    • visitEnter

      boolean visitEnter(NbtList<?> list)
      Begin visiting a list node that contains multiple child nodes of the same type.
      Parameters:
      list - - the NBT tag to process.
      Returns:
      TRUE to visit the child nodes of this list, FALSE otherwise.
    • visitEnter

      boolean visitEnter(NbtCompound compound)
      Begin visiting a compound node that contains multiple child nodes of different types.
      Parameters:
      compound - - the NBT tag to process.
      Returns:
      TRUE to visit the child nodes of this compound, FALSE otherwise.
    • visitLeave

      boolean visitLeave(NbtList<?> list)
      Stop visiting a list node.
      Parameters:
      list - - the list we're done visiting.
      Returns:
      TRUE for the parent to visit any subsequent sibling nodes, FALSE otherwise.
    • visitLeave

      boolean visitLeave(NbtCompound compound)
      Stop visiting a compound node.
      Parameters:
      compound - - the compound we're done visting.
      Returns:
      TRUE for the parent to visit any subsequent sibling nodes, FALSE otherwise