@Override public String getName() { if( name == null ) name = Util.join( getTailNames(), "+" ); return name; }
private void verifyPipe() { if( !( previous instanceof SubAssembly ) ) return; String[] strings = ( (SubAssembly) previous ).getTailNames(); if( strings.length != 1 ) throw new IllegalArgumentException( "pipe assembly must not return more than one tail pipe instance, found " + Util.join( strings, ", " ) ); }
private static void collectNames( Pipe[] pipes, Set<String> names ) { for( Pipe pipe : pipes ) { if( pipe instanceof SubAssembly ) names.addAll( asList( ( (SubAssembly) pipe ).getTailNames() ) ); else names.add( pipe.getName() ); collectNames( SubAssembly.unwind( pipe.getPrevious() ), names ); } }