contentWithPathComponent method
Implementation
@protected
RuntimeObject? contentWithPathComponent(Component component) {
if (component.isIndex) {
if (component.index >= 0 && component.index < content.length) {
return content[component.index];
}
// When path is out of range, quietly return nil
// (useful as we step/increment forwards through content)
else {
return null;
}
} else if (component.isParent) {
return parent;
} else {
NamedContent? foundContent = namedContent[component.name];
if (foundContent != null) {
return foundContent as RuntimeObject;
} else {
return null;
}
}
}