Java String Explode explodeLongs(String line, String sep)

Here you can find the source of explodeLongs(String line, String sep)

Description

explode Longs

License

Open Source License

Declaration

public static List<Long> explodeLongs(String line, String sep) 

Method Source Code

//package com.java2s;
/*//ww w.  j a v  a  2  s  .co  m
 * Copyright (C) ${year} Omry Yadan <${email}>
 * All rights reserved.
 *
 * See https://github.com/omry/banana/blob/master/BSD-LICENSE for licensing information
 */

import java.util.*;

public class Main {
    public static List<Long> explodeLongs(String line, String sep) {
        List<Long> res = new ArrayList<Long>();
        StringTokenizer t = new StringTokenizer(line, sep);
        while (t.hasMoreElements()) {
            res.add(Long.parseLong(t.nextToken()));
        }
        return res;
    }
}

Related

  1. explode(String string, String separators)
  2. explode(String tokenizer, String text)
  3. explode(String[] elements, String separator)
  4. explodeCamelCase(String str, boolean excludeGetOrSet)
  5. explodeDomains(final String fqdn)
  6. explodeQuoted(String arg)