Examples of countTokens()


Examples of java.util.StringTokenizer.countTokens()

          layout.setColumnWeight(i + 1, Integer.parseInt(hweights.nextToken()));
        }
      }
      if (!layoutNode.getAttribute("vweights").equals("")) {
        StringTokenizer vweights = new StringTokenizer(layoutNode.getAttribute("vweights"), ",");
        int vweightsCount = vweights.countTokens();

        for (int i = 0; i < vweightsCount; i++) {
          layout.setRowWeight(i + 1, Integer.parseInt(vweights.nextToken()));
        }
      }
View Full Code Here

Examples of java.util.StringTokenizer.countTokens()

                System.out.println("VPFSpecialist: parsing path string: "
                        + path);
            }
            try {
                StringTokenizer token = new StringTokenizer(path, tok);
                int numPaths = token.countTokens();

                ret = new String[numPaths];
                for (int i = 0; i < numPaths; i++) {
                    ret[i] = token.nextToken();
                }
View Full Code Here

Examples of java.util.StringTokenizer.countTokens()

        String fileTypes = textFileTypes.getText();
        changed = !fileTypes.equals(orig);
       
        if (changed) {
            StringTokenizer st = new StringTokenizer(fileTypes, ",");
            String[] extensions = new String[st.countTokens()];
            int i = 0;
            while (st.hasMoreTokens())
                extensions[i++] = (String) st.nextElement();
           
            settings.set(DcRepository.ModuleSettings.stFileImportFileTypes, extensions);
View Full Code Here

Examples of java.util.StringTokenizer.countTokens()

     
      JSONArray resultArray = null;
     
      if(resultsEntryPath != null) {
        StringTokenizer st = new StringTokenizer(resultsEntryPath,".");
        if(jsonObject instanceof JSONArray && st.countTokens() > 0) {
          JSONArray array = (JSONArray) jsonObject;
          if(array.size() == 1) {
            jsonObject = array.get(0);
          }
        }
View Full Code Here

Examples of jsky.util.StringTokenizerUtil.countTokens()

     * @param s A line containing tab separated column headings.
     * @return A vector of column heading Strings.
     */
    protected Vector _parseHeading(String s) {
        StringTokenizerUtil st = new StringTokenizerUtil(s, _columnSeparator);
        Vector<Object> v = new Vector<Object>(st.countTokens(), 1);
        while (st.hasMoreTokens()) {
            v.add(st.nextToken().trim());
        }
        return v;
    }
View Full Code Here

Examples of net.sf.xbus.base.core.ASCIITokenizer.countTokens()

      {
        optional = "X";
      }

      ASCIITokenizer tok = new ASCIITokenizer(inParameter, ",");
      if (tok.countTokens() < 3)
      {
        Trace.warn("Parameter must have at least three tokens, "
            + inFile + " |" + inMethod + "|" + inParameter);
      }
      else
View Full Code Here

Examples of org.apache.cocoon.util.Tokenizer.countTokens()

        return split(line, " \t\r\f\n");
    }

    public static String[] split(String line, String delimiter) {
        Tokenizer tokenizer = new Tokenizer(line, delimiter);
        int tokenCount = tokenizer.countTokens();
        String[] result = new String[tokenCount];
        for (int i = 0; i < tokenCount; i++) {
            result[i] = tokenizer.nextToken();
        }
        return result;
View Full Code Here

Examples of org.apache.qpid.framing.AMQShortStringTokenizer.countTokens()

                if(queueList2 == null)
                {
                    queueList2 = _wildCardBindingKey2queues.get(routingKey);
                    AMQShortStringTokenizer keyTok = routingKey.tokenize(TOPIC_SEPARATOR);

                    ArrayList<AMQShortString> keyTokList = new ArrayList<AMQShortString>(keyTok.countTokens());

                    while (keyTok.hasMoreTokens())
                    {
                        keyTokList.add(keyTok.nextToken());
                    }
View Full Code Here

Examples of org.damour.base.client.utils.StringTokenizer.countTokens()

    }
    if (StringUtils.isEmpty(text)) {
      return settings;
    }
    StringTokenizer lineTokenizer = new StringTokenizer(text, '\n');
    for (int i = 0; i < lineTokenizer.countTokens(); i++) {
      String line = lineTokenizer.tokenAt(i);
      if (line.indexOf('=') != -1) {
        String key = line.substring(0,line.indexOf('=')).trim();
        String value = line.substring(line.indexOf('=')+1).trim();
        settings.put(key, value);
View Full Code Here

Examples of org.geotools.gce.grassraster.core.color.JlsTokenizer.countTokens()

            String line;
            while( (line = rdr.readLine()) != null ) {
                /* All lines other than '0:no data' are processed */
                if (line.indexOf("0:no data") == -1) { //$NON-NLS-1$
                    JlsTokenizer tk = new JlsTokenizer(line, ":"); //$NON-NLS-1$
                    if (tk.countTokens() == 2) {
                        float f = Float.parseFloat(tk.nextToken());
                        String att = tk.nextToken().trim();
                        attTable.addAttribute(f, att);
                    } else if (tk.countTokens() == 3) {
                        float f0 = Float.parseFloat(tk.nextToken());
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.