Java HTML Jsoup Element getInt(Elements td, int i)

Here you can find the source of getInt(Elements td, int i)

Description

get Int

License

LGPL

Declaration

public static int getInt(Elements td, int i) 

Method Source Code


//package com.java2s;
//License from project: LGPL 

import static com.google.common.base.Strings.isNullOrEmpty;

import org.jsoup.select.Elements;

public class Main {
    public static int getInt(Elements td, int i) {
        String s = getString(td, i);
        String n = isNullOrEmpty(s) ? "-1" : s;
        return Integer.parseInt(n);
    }/*from  w  w w.ja va 2s. c  o  m*/

    public static String getString(Elements td, int i) {
        return td.get(i).text();
    }
}

Related

  1. getElementValue(Element wrapperElement, String cssQuery)
  2. getElIndexInSameTags(Element e)
  3. getFirstWithOwnText(final Elements elementList, final String text)
  4. getFormattedText(Element element)
  5. getIndustry(Element element)
  6. getLink(Element element, int index)
  7. getMoney(final Element container)
  8. getNameFromAttributes(org.jsoup.nodes.Element e)
  9. getOneSubItemOfClass(Element parent, String className)