@Override public Pipe[] getPrevious() { // returns the semantically equivalent to Pipe#previous to simplify logic in the planner // SubAssemblies are really aliases for their tails if( tails == null ) throw new IllegalStateException( TraceUtil.formatRawTrace( this, "setTails must be called after the sub-assembly is assembled" ) ); return Arrays.copyOf( tails, tails.length ); } }
/** * Method getTailNames returns the tailNames of this SubAssembly object. * * @return the tailNames (type String[]) of this SubAssembly object. */ public String[] getTailNames() { if( tails == null ) throw new IllegalStateException( TraceUtil.formatRawTrace( this, "setTails must be called in the constructor" ) ); if( names != null ) return names; names = new String[ tails.length ]; for( int i = 0; i < tails.length; i++ ) names[ i ] = tails[ i ].getName(); return names; }