Package org.apache.sling.contentparser.testutils.mapsupport

## Class ContentElement

- java.lang.Object
- - org.apache.sling.contentparser.testutils.mapsupport.ContentElement

    public final class ContentElement
    extends java.lang.Object

Implements support for a `ContentHandler` parsed resource to use during `ContentParser` tests.

### Method Summary

All Methods Instance Methods Concrete Methods
`ContentElement` `getChild​(java.lang.String path)` Returns the child with the specified `path`.
`java.util.Map<java.lang.String,​ContentElement>` `getChildren()` Returns the children of this resource.
`java.lang.String` `getName()` Returns the name of the resource.
`java.util.Map<java.lang.String,​java.lang.Object>` `getProperties()` Properties of this resource.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### getName

    public java.lang.String getName()

Returns the name of the resource.

Returns:
  resource name; the root resource has no name (null).

#### getProperties

    public java.util.Map<java.lang.String,​java.lang.Object> getProperties()

Properties of this resource.

Returns:
  this resource's properties (keys, values)

#### getChildren

    public java.util.Map<java.lang.String,​ContentElement> getChildren()

Returns the children of this resource. The Map preserves the children's ordering.

Returns:
  the children of this resource (child names, child objects)

#### getChild

    public ContentElement getChild​(java.lang.String path)

Returns the child with the specified `path`.

Parameters:
  `path` - relative path to address child or one of its descendants (use "/" as hierarchy separator)
Returns:
  child or `null` if no child was found for the specified `path`