Refine search
/** * Returns all arguments defined by <code>addLine</code>, <code>addValue</code> or the argument object. */ public String[] getArguments() { Vector<String> result = new Vector<String>( arguments.size() * 2 ); for ( int i = 0; i < arguments.size(); i++ ) { Arg arg = arguments.elementAt( i ); String[] s = arg.getParts(); if ( s != null ) { for ( String value : s ) { result.addElement( value ); } } } String[] res = new String[result.size()]; result.copyInto( res ); return res; }
public String[] dir() throws KettleJobException { String[] fileList = null; try { java.util.Vector<?> v = c.ls( "." ); java.util.Vector<String> o = new java.util.Vector<String>(); if ( v != null ) { for ( int i = 0; i < v.size(); i++ ) { Object obj = v.elementAt( i ); if ( obj != null && obj instanceof com.jcraft.jsch.ChannelSftp.LsEntry ) { LsEntry lse = (com.jcraft.jsch.ChannelSftp.LsEntry) obj; if ( !lse.getAttrs().isDir() ) { o.add( lse.getFilename() ); } } } } if ( o.size() > 0 ) { fileList = new String[o.size()]; o.copyInto( fileList ); } } catch ( SftpException e ) { throw new KettleJobException( e ); } return fileList; }
tokenizer.whitespaceChars(0, ' '); tokenizer.eolIsSignificant(true); java.util.Vector<Double> vD = new java.util.Vector<Double>(); do vD.addElement(Double.valueOf(tokenizer.sval)); // Read & store 1st row. v.addElement(row = new double[n]); int j = 0; do ("Row " + v.size() + " is too long."); row[j++] = Double.valueOf(tokenizer.sval).doubleValue(); ("Row " + v.size() + " is too short."); int m = v.size(); // Now we've got the number of rows. double[][] A = new double[m][]; v.copyInto(A); // copy the rows out of the vector return new Matrix(A);
/** * Returns the names of the files which matched at least one of the include patterns and none of the exclude * patterns. The names are relative to the base directory. * * @return the names of the files which matched at least one of the include patterns and none of the exclude * patterns. */ public String[] getIncludedFiles() { String[] files = new String[filesIncluded.size()]; filesIncluded.copyInto( files ); return files; }
int state = normal; StringTokenizer tok = new StringTokenizer(toProcess, "\"\' ", true); Vector v = new Vector(); StringBuffer current = new StringBuffer(); } else if (" ".equals(nextTok)) { if (current.length() != 0) { v.addElement(current.toString()); current.setLength(0); v.addElement(current.toString()); String[] args = new String[v.size()]; v.copyInto(args); return args;
/** * Returns the names of the directories which matched at least one of the include patterns and none of the exclude * patterns. The names are relative to the base directory. * * @return the names of the directories which matched at least one of the include patterns and none of the exclude * patterns. */ public String[] getIncludedDirectories() { String[] directories = new String[dirsIncluded.size()]; dirsIncluded.copyInto( directories ); return directories; }
int state = normal; StringTokenizer tok = new StringTokenizer( toProcess, "\"\' ", true ); Vector<String> v = new Vector<String>(); StringBuilder current = new StringBuilder(); v.addElement( current.toString() ); current.setLength( 0 ); v.addElement( current.toString() ); String[] args = new String[v.size()]; v.copyInto( args ); return args;
/** * Returns the certificates for this {@code Identity}. External * modifications of the returned array has no impact on this {@code * Identity}. * * @return the {@code Certificates} for this {@code Identity} */ public Certificate[] certificates() { if (certificates == null) { return new Certificate[0]; } Certificate[] ret = new Certificate[certificates.size()]; certificates.copyInto(ret); return ret; }
int STICK = 0x4; // INPARAM + " or STICK + non_" // NOI18N int STICKPENDING = 0x8; // STICK + \ Vector<String> params = new Vector<String>(5, 5); char c; if (state == NULL) { if (buff.length() > 0) { params.addElement(buff.toString()); buff.setLength(0); params.addElement(buff.toString()); buff.setLength(0); state = NULL; } else if (state == STICKPENDING) { buff.append('\\'); params.addElement(buff.toString()); buff.setLength(0); state = NULL; String[] ret = new String[params.size()]; params.copyInto(ret);
/** * Return the names of the directories which matched at least one of the * include patterns and none of the exclude patterns. * The names are relative to the base directory. * * @return the names of the directories which matched at least one of the * include patterns and none of the exclude patterns. */ public synchronized String[] getIncludedDirectories() { if (dirsIncluded == null) { throw new IllegalStateException("Must call scan() first"); } String[] directories = new String[dirsIncluded.size()]; dirsIncluded.copyInto(directories); Arrays.sort(directories); return directories; }
Vector dbv = new Vector(5); // usually 5 or less databases MimeTypeFile mf = null; dbv.addElement(null); // place holder for PROG entry mf = loadFile(path); if (mf != null) dbv.addElement(mf); mf = loadFile(system_mimetypes); if (mf != null) dbv.addElement(mf); } catch (SecurityException ex) {} dbv.addElement(defDB); DB = new MimeTypeFile[dbv.size()]; dbv.copyInto(DB);
protected Vector generateRuleVector(RuleNode root) { Vector vrules = new Vector(20); collectRules(root, vrules); Rule srules [] = new Rule[vrules.size()]; vrules.copyInto(srules); srules = (Rule[]) Sorter.sortComparableArray(srules, true); for (int i=0; i < srules.length; i++) vrules.setElementAt(srules[i], i); return vrules; }
/** * Return the names of the files which matched at least one of the * include patterns and none of the exclude patterns. * The names are relative to the base directory. * * @return the names of the files which matched at least one of the * include patterns and none of the exclude patterns. */ public synchronized String[] getIncludedFiles() { if (filesIncluded == null) { throw new IllegalStateException("Must call scan() first"); } String[] files = new String[filesIncluded.size()]; filesIncluded.copyInto(files); Arrays.sort(files); return files; }
Vector<StyleRange> styles = new Vector<StyleRange>(); int token; StyleRange lastStyle; styles.addElement( new StyleRange( event.lineOffset, event.lineText.length() + 4, colors[1], null ) ); event.styles = new StyleRange[styles.size()]; styles.copyInto( event.styles ); return; styles.addElement( style ); } else { lastStyle = styles.lastElement(); lastStyle.length += style.length; } else { styles.addElement( style ); event.styles = new StyleRange[styles.size()]; styles.copyInto( event.styles );
public String[] getShortcuts() { Vector v = new Vector(); Hashtable shortcuts = Menus.getShortcuts(); addShortcutsToVector(shortcuts, v); Hashtable macroShortcuts = Menus.getMacroShortcuts(); addShortcutsToVector(macroShortcuts, v); String[] list = new String[v.size()]; v.copyInto((String[])list); return list; }