Package winterwell.utils.containers

Examples of winterwell.utils.containers.Pair


      ResultSetMetaData meta = rs.getMetaData();
      List<Pair<String>> list = new ArrayList();
      for (int i = 0; i < meta.getColumnCount(); i++) {
        String name = meta.getColumnName(i + 1);
        String type = meta.getColumnTypeName(i + 1);
        Pair p = new Pair(name, type);
        list.add(p);
      }
      return list;
    } catch (SQLException e) {
      throw Utils.runtime(e);
View Full Code Here


    if (rs.isEmpty())
      throw new IllegalArgumentException("No such table: " + table);

    cols = new ArrayList();
    for (Object[] objects : rs) {
      Pair p = new Pair(objects[0], objects[1]);
      cols.add(p);
    }

    // cache it
    table2columns.put(table, cols);
View Full Code Here

    regex = regex.replaceAll("\\s+", "\\\\s+");
    // find it
    Pattern p = Pattern.compile(regex);
    Matcher m = p.matcher(text);
    if (m.find(start))
      return new Pair(m.start(), m.end());
    return null;
  }
View Full Code Here

TOP

Related Classes of winterwell.utils.containers.Pair

Copyright © 2018 www.massapicom. 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.