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.
|
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)
Returns the elements matching the path of regular expressions.
|
List<Element> |
queryPath(String... nameRegexs)
Returns the elements matching the path of regular expressions.
|
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.String getName()
ElementType getType()
<E extends Element> List<E> queryPath(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> queryPath(String... nameRegexs)
nameRegexs
- The path of regular expressions.Element withName(String name)
name
- The new name for the element.Copyright © 2011-2012 Allanbank Consulting, Inc.. All Rights Reserved.