public interface Element extends Serializable, ElementAssignable
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor visitor)
Accepts the visitor and calls the appropriate method on the visitor based
on the element type.
|
<E extends Element> |
find(Class<E> clazz,
String... nameRegexs)
Returns the elements matching the path of regular expressions.
|
List<Element> |
find(String... nameRegexs)
Returns the elements matching the path of regular expressions.
|
<E extends Element> |
findFirst(Class<E> clazz,
String... nameRegexs)
Returns the first element matching the path of regular expressions.
|
Element |
findFirst(String... nameRegexs)
Returns the first element matching the path of regular expressions.
|
String |
getName()
Returns the name for the BSON type.
|
ElementType |
getType()
Returns the type for the BSON type.
|
<E extends Element> |
queryPath(Class<E> clazz,
String... nameRegexs)
Deprecated.
Use the
find(Class,String...) method instead. Will
be removed after the 1.1.0 release. |
List<Element> |
queryPath(String... nameRegexs)
Deprecated.
Use the
find(String...) method instead. Will be
removed after the 1.1.0 release. |
Element |
withName(String name)
Creates a new element with the same type and value as this element but
with the specified name.
|
asElement
void accept(Visitor visitor)
visitor
- The visitor for the element.<E extends Element> List<E> find(Class<E> clazz, String... nameRegexs)
E
- The type of element to match.clazz
- The class of elements to match.nameRegexs
- The path of regular expressions.List<Element> find(String... nameRegexs)
nameRegexs
- The path of regular expressions.<E extends Element> E findFirst(Class<E> clazz, String... nameRegexs)
E
- The type of element to match.clazz
- The class of element to match.nameRegexs
- The path of regular expressions.Element findFirst(String... nameRegexs)
nameRegexs
- The path of regular expressions.String getName()
ElementType getType()
@Deprecated <E extends Element> List<E> queryPath(Class<E> clazz, String... nameRegexs)
find(Class,String...)
method instead. Will
be removed after the 1.1.0 release.E
- The type of element to match.clazz
- The class of elements to match.nameRegexs
- The path of regular expressions.@Deprecated List<Element> queryPath(String... nameRegexs)
find(String...)
method instead. Will be
removed after the 1.1.0 release.nameRegexs
- The path of regular expressions.Element withName(String name)
name
- The new name for the element.Copyright © 2011-2013 Allanbank Consulting, Inc.. All Rights Reserved.