Class ModelElement
java.lang.Object
com.yahoo.vespa.model.builder.xml.dom.ModelElement
A w3c Element wrapper with a better API.
Author unknown.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
asDouble()
long
asLong()
asString()
boolean
booleanAttribute
(String name) boolean
booleanAttribute
(String name, boolean defaultValue) Returns the child with the given name, or null if none.childAsBoolean
(String path) childAsDouble
(String path) childAsDuration
(String path) childAsInteger
(String path) childAsLong
(String path) childAsString
(String path) childByPath
(String path) If not found, return empty list.doubleAttribute
(String name) getXml()
integerAttribute
(String name) Returns the value of this attribute or null if not presentintegerAttribute
(String name, Integer defaultValue) longAttribute
(String name) double
Returns the given attribute or throws IllegalArgumentException if not presentint
Returns the given attribute or throws IllegalArgumentException if not presentReturns the content of the attribute with the given name or throws IllegalArgumentException if not presentstringAttribute
(String name) Returns the content of the attribute with the given name, or null if nonestringAttribute
(String name, String defaultValue) Returns the content of the attribute with the given name, or the default value if nonesubElements
(String name) toString()
-
Constructor Details
-
ModelElement
-
-
Method Details
-
getXml
-
child
Returns the child with the given name, or null if none. -
children
If not found, return empty list. -
childByPath
-
childAsString
-
asString
-
asDouble
public double asDouble() -
asLong
public long asLong() -
asDuration
-
childAsLong
-
childAsInteger
-
childAsDouble
-
childAsBoolean
-
childAsDuration
-
requiredIntegerAttribute
Returns the given attribute or throws IllegalArgumentException if not present -
integerAttribute
Returns the value of this attribute or null if not present -
integerAttribute
-
booleanAttribute
-
booleanAttribute
-
longAttribute
-
doubleAttribute
-
requiredDoubleAttribute
Returns the given attribute or throws IllegalArgumentException if not present -
stringAttribute
Returns the content of the attribute with the given name, or null if none -
stringAttribute
Returns the content of the attribute with the given name, or the default value if none -
requiredStringAttribute
Returns the content of the attribute with the given name or throws IllegalArgumentException if not present -
subElements
-
toString
-