Class PlainText

All Implemented Interfaces:
Selectable
Direct Known Subclasses:
Json

public class PlainText extends AbstractSelectable
Selectable plain text.
Can not be selected by XPath or CSS Selector.
Since:
0.1.0
Author:
code4crafter@gmail.com
  • Field Details

    • sourceTexts

      protected List<String> sourceTexts
  • Constructor Details

    • PlainText

      public PlainText(List<String> sourceTexts)
    • PlainText

      public PlainText(String text)
  • Method Details

    • create

      public static PlainText create(String text)
    • xpath

      public Selectable xpath(String xpath)
      Description copied from interface: Selectable
      select list with xpath
      Parameters:
      xpath - xpath
      Returns:
      new Selectable after extract
    • $

      public Selectable $(String selector)
      Description copied from interface: Selectable
      select list with css selector
      Parameters:
      selector - css selector expression
      Returns:
      new Selectable after extract
    • $

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

      public Selectable links()
      Description copied from interface: Selectable
      select all links
      Returns:
      all links
    • nodes

      public List<Selectable> nodes()
      Description copied from interface: Selectable
      get all nodes
      Returns:
      result
    • getSourceTexts

      protected List<String> getSourceTexts()
      Specified by:
      getSourceTexts in class AbstractSelectable