Interface Selectable

All Known Implementing Classes:
AbstractSelectable, Html, HtmlNode, Json, PlainText

public interface Selectable
Selectable text.
Since:
0.1.0
Author:
code4crafter@gmail.com
  • Method Details

    • xpath

      Selectable xpath(String xpath)
      select list with xpath
      Parameters:
      xpath - xpath
      Returns:
      new Selectable after extract
    • $

      Selectable $(String selector)
      select list with css selector
      Parameters:
      selector - css selector expression
      Returns:
      new Selectable after extract
    • $

      Selectable $(String selector, String attrName)
      select list with css selector
      Parameters:
      selector - css selector expression
      attrName - attribute name of css selector
      Returns:
      new Selectable after extract
    • css

      Selectable css(String selector)
      select list with css selector
      Parameters:
      selector - css selector expression
      Returns:
      new Selectable after extract
    • css

      Selectable css(String selector, String attrName)
      select list with css selector
      Parameters:
      selector - css selector expression
      attrName - attribute name of css selector
      Returns:
      new Selectable after extract
    • links

      Selectable links()
      select all links
      Returns:
      all links
    • regex

      Selectable regex(String regex)
      select list with regex, default group is group 1
      Parameters:
      regex - regex
      Returns:
      new Selectable after extract
    • regex

      Selectable regex(String regex, int group)
      select list with regex
      Parameters:
      regex - regex
      group - group
      Returns:
      new Selectable after extract
    • replace

      Selectable replace(String regex, String replacement)
      replace with regex
      Parameters:
      regex - regex
      replacement - replacement
      Returns:
      new Selectable after extract
    • toString

      String toString()
      single string result
      Overrides:
      toString in class Object
      Returns:
      single string result
    • get

      String get()
      single string result
      Returns:
      single string result
    • match

      boolean match()
      if result exist for select
      Returns:
      true if result exist
    • all

      List<String> all()
      multi string result
      Returns:
      multi string result
    • jsonPath

      Selectable jsonPath(String jsonPath)
      extract by JSON Path expression
      Parameters:
      jsonPath - jsonPath
      Returns:
      result
    • select

      Selectable select(Selector selector)
      extract by custom selector
      Parameters:
      selector - selector
      Returns:
      result
    • selectList

      Selectable selectList(Selector selector)
      extract by custom selector
      Parameters:
      selector - selector
      Returns:
      result
    • nodes

      List<Selectable> nodes()
      get all nodes
      Returns:
      result