private static String concat ( final String ... aPathsVarargs ) { final String path ; Objects . requireNonNull ( aPathsVarargs ) ; if ( aPathsVarargs . length == 0 ) { path = "" ; } else { final StringBuffer pathBuf = new StringBuffer ( ) ; Character lastChar = null ; for ( final String aPathsVararg : aPathsVarargs ) { if ( aPathsVararg != null ) { final int length ; if ( lastChar != null && ! mySeparator . equals ( lastChar ) ) { pathBuf . append ( mySeparator ) ; } pathBuf . append ( aPathsVararg ) ; length = aPathsVararg . length ( ) ; lastChar = aPathsVararg . charAt ( length - 1 ) ; } } path = pathBuf . toString ( ) ; } return path ; }
Concatenates the Pairtree paths varargs .