public abstract class AbstractSelectable extends Object implements Selectable
Constructor and Description |
---|
AbstractSelectable() |
Modifier and Type | Method and Description |
---|---|
List<String> |
all()
multi string result
|
Selectable |
css(String selector)
select list with css selector
|
Selectable |
css(String selector,
String attrName)
select list with css selector
|
String |
get()
single string result
|
String |
getFirstSourceText() |
protected abstract List<String> |
getSourceTexts() |
Selectable |
jsonPath(String jsonPath)
extract by JSON Path expression
|
boolean |
match()
if result exist for select
|
Selectable |
regex(String regex)
select list with regex, default group is group 1
|
Selectable |
regex(String regex,
int group)
select list with regex
|
Selectable |
replace(String regex,
String replacement)
replace with regex
|
Selectable |
select(Selector selector)
extract by custom selector
|
protected Selectable |
select(Selector selector,
List<String> strings) |
Selectable |
selectList(Selector selector)
extract by custom selector
|
protected Selectable |
selectList(Selector selector,
List<String> strings) |
String |
toString()
single string result
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
$, $, links, nodes, smartContent, xpath
public Selectable css(String selector)
Selectable
css
in interface Selectable
selector
- css selector expressionpublic Selectable css(String selector, String attrName)
Selectable
css
in interface Selectable
selector
- css selector expressionattrName
- attribute name of css selectorprotected Selectable select(Selector selector, List<String> strings)
protected Selectable selectList(Selector selector, List<String> strings)
public List<String> all()
Selectable
all
in interface Selectable
public Selectable jsonPath(String jsonPath)
Selectable
jsonPath
in interface Selectable
jsonPath
- jsonPathpublic String get()
Selectable
get
in interface Selectable
public Selectable select(Selector selector)
Selectable
select
in interface Selectable
selector
- selectorpublic Selectable selectList(Selector selector)
Selectable
selectList
in interface Selectable
selector
- selectorpublic Selectable regex(String regex)
Selectable
regex
in interface Selectable
regex
- regexpublic Selectable regex(String regex, int group)
Selectable
regex
in interface Selectable
regex
- regexgroup
- grouppublic Selectable replace(String regex, String replacement)
Selectable
replace
in interface Selectable
regex
- regexreplacement
- replacementpublic String getFirstSourceText()
public String toString()
Selectable
toString
in interface Selectable
toString
in class Object
public boolean match()
Selectable
match
in interface Selectable
Copyright © 2017. All rights reserved.