public class OXPathType extends Object
Modifier and Type | Class and Description |
---|---|
static class |
OXPathType.OXPathTypes
enumerated types of different types in OXPath
|
Modifier and Type | Field and Description |
---|---|
static OXPathType |
EMPTYRESULT
premade object that returns empty output
|
Constructor and Description |
---|
OXPathType()
Null constructor
|
OXPathType(boolean in)
Constructor for booleans
|
OXPathType(double in)
Constructor for number inputs
|
OXPathType(IOXPathNodeList in)
Constructor for nodelists
|
OXPathType(List<?> byXPath,
int parent,
int last)
Constructor for handling output from the getByXPath function from HtmlUnit
|
OXPathType(OXPathContextNode j)
Expression for setting state
|
OXPathType(OXPathType other)
Returns a new (defensive) copy of the implicit parameter
|
OXPathType(String in)
Constructor for strings
|
Modifier and Type | Method and Description |
---|---|
boolean |
booleanValue()
Casts object as boolean
|
Object |
getValue()
Not class-safe, but returns value based on instantiation of type in the object
|
OXPathType.OXPathTypes |
isType()
Expression that returns type of Object
|
IOXPathNodeList |
nodeList()
Casts object as IOXPathNodeList
|
Double |
number()
Casts object as double
|
void |
set(boolean in)
Expression for setting state
|
void |
set(Double in)
Expression for setting state
|
void |
set(IOXPathNodeList in)
Expression for setting state
|
void |
set(Object in)
Expression for setting null state
|
void |
set(String in)
Expression for setting state
|
String |
string()
Casts object as String
|
String |
toPrettyHtml()
returns a
String encoding of XPath primatives and concatenated pretty html versions of nodelists Useful for
attribute extraction marker output. |
String |
toString() |
public static final OXPathType EMPTYRESULT
public OXPathType()
public OXPathType(OXPathType other)
other
- {OXPathType to copy}public OXPathType(IOXPathNodeList in)
in
- input nodelistpublic OXPathType(String in)
in
- input Stringpublic OXPathType(double in)
in
- input intpublic OXPathType(boolean in)
in
- input booleanpublic OXPathType(List<?> byXPath, int parent, int last)
byXPath
- input of List> from getByXPathparent
- reference to parent node of current contextlast
- reference to parent node of current contextpublic OXPathType(OXPathContextNode j)
j
- input NodeListpublic void set(IOXPathNodeList in)
in
- input NodeListpublic void set(String in)
in
- input Stringpublic void set(Double in)
in
- input intpublic void set(boolean in)
in
- input booleanpublic void set(Object in)
public OXPathType.OXPathTypes isType()
public IOXPathNodeList nodeList() throws OXPathException
OXPathException
- if the object is nullpublic String string() throws OXPathException
OXPathException
- if the object is nullpublic Double number() throws OXPathException
OXPathException
- if the object is nullpublic boolean booleanValue() throws OXPathException
OXPathException
- if the object is nullpublic Object getValue()
public String toPrettyHtml() throws OXPathException
String
encoding of XPath primatives and concatenated pretty html versions of nodelists Useful for
attribute extraction marker output.String
encoding of XPath primatives and concatenated pretty html versions of nodelistsOXPathException
- if the object is nullCopyright © 2020 OXPath Team. All rights reserved.