Package com.cedarsoft.commons.struct

Examples of com.cedarsoft.commons.struct.StructureTreeWalker.walk()


  @NotNull
  public String present( @NotNull StructPart struct ) {
    final StringBuilder builder = new StringBuilder();

    StructureTreeWalker treeWalker = new DepthFirstStructureTreeWalker();
    treeWalker.walk( struct, new StructureTreeWalker.WalkerCallBack() {
      public void nodeReached( @NotNull StructPart node, int level ) {
        for ( int i = 0; i < level; i++ ) {
          builder.append( intendSequence );
        }
        builder.append( node.getName() );
View Full Code Here


    if ( !baseDir.isDirectory() ) {
      throw new IllegalArgumentException( "Base dir is not a directory" );
    }

    StructureTreeWalker walker = new BreadthFirstStructureTreeWalker();
    walker.walk( root, new StructureTreeWalker.WalkerCallBack() {
      @Override
      public void nodeReached( @NotNull StructPart node, int level ) {
        Path path = Path.buildPath( node ); //pop the root
        if ( !rootVisible ) {
          path = path.popped();
View Full Code Here

    if ( !baseDir.isDirectory() ) {
      throw new IllegalArgumentException( "Base dir is not a directory" );
    }

    StructureTreeWalker walker = new BreadthFirstStructureTreeWalker();
    walker.walk( root, new StructureTreeWalker.WalkerCallBack() {
      @Override
      public void nodeReached( @NotNull StructPart node, int level ) {
        Path path = Path.buildPath( node ); //pop the root
        if ( !rootVisible ) {
          path = path.popped();
View Full Code Here

  @Nonnull
  public String present( @Nonnull StructPart struct ) {
    final StringBuilder builder = new StringBuilder();

    StructureTreeWalker treeWalker = new DepthFirstStructureTreeWalker();
    treeWalker.walk( struct, new StructureTreeWalker.WalkerCallBack() {
      @Override
      public void nodeReached( @Nonnull StructPart node, int level ) {
        for ( int i = 0; i < level; i++ ) {
          builder.append( intendSequence );
        }
View Full Code Here

  @NotNull
  public String present( @NotNull StructPart struct ) {
    final StringBuilder builder = new StringBuilder();

    StructureTreeWalker treeWalker = new DepthFirstStructureTreeWalker();
    treeWalker.walk( struct, new StructureTreeWalker.WalkerCallBack() {
      @Override
      public void nodeReached( @NotNull StructPart node, int level ) {
        for ( int i = 0; i < level; i++ ) {
          builder.append( intendSequence );
        }
View Full Code Here

  @NotNull
  public String present( @NotNull StructPart struct ) {
    final StringBuilder builder = new StringBuilder();

    StructureTreeWalker treeWalker = new DepthFirstStructureTreeWalker();
    treeWalker.walk( struct, new StructureTreeWalker.WalkerCallBack() {
      @Override
      public void nodeReached( @NotNull StructPart node, int level ) {
        for ( int i = 0; i < level; i++ ) {
          builder.append( intendSequence );
        }
View Full Code Here

  @NotNull
  public String present( @NotNull StructPart struct ) {
    final StringBuilder builder = new StringBuilder();

    StructureTreeWalker treeWalker = new DepthFirstStructureTreeWalker();
    treeWalker.walk( struct, new StructureTreeWalker.WalkerCallBack() {
      @Override
      public void nodeReached( @NotNull StructPart node, int level ) {
        for ( int i = 0; i < level; i++ ) {
          builder.append( intendSequence );
        }
View Full Code Here

    if ( !baseDir.isDirectory() ) {
      throw new IllegalArgumentException( "Base dir is not a directory" );
    }

    StructureTreeWalker walker = new BreadthFirstStructureTreeWalker();
    walker.walk( root, new StructureTreeWalker.WalkerCallBack() {
      @Override
      public void nodeReached( @Nonnull StructPart node, int level ) {
        Path path = Path.buildPath( node ); //pop the root
        if ( !rootVisible ) {
          path = path.popped();
View Full Code Here

    if ( !baseDir.isDirectory() ) {
      throw new IllegalArgumentException( "Base dir is not a directory" );
    }

    StructureTreeWalker walker = new BreadthFirstStructureTreeWalker();
    walker.walk( root, new StructureTreeWalker.WalkerCallBack() {
      @Override
      public void nodeReached( @Nonnull StructPart node, int level ) {
        Path path = Path.buildPath( node ); //pop the root
        if ( !rootVisible ) {
          path = path.popped();
View Full Code Here

  @NotNull
  public String present( @NotNull StructPart struct ) {
    final StringBuilder builder = new StringBuilder();

    StructureTreeWalker treeWalker = new DepthFirstStructureTreeWalker();
    treeWalker.walk( struct, new StructureTreeWalker.WalkerCallBack() {
      @Override
      public void nodeReached( @NotNull StructPart node, int level ) {
        for ( int i = 0; i < level; i++ ) {
          builder.append( intendSequence );
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.