Interface ITreeModel
-
- All Superinterfaces:
IModel
,IValidable
public interface ITreeModel extends IModel
The interface of model for tree component.- Since:
- 1.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Stream<Object>
getChildren(Object element)
Returns a stream of children objects of the specified parentelement
.Stream<Object>
getElements()
Returns a stream of top level objectsOptional<Object>
getParent(Object element)
Returns the parent object for the specifiedelement
.boolean
hasChildren(Object element)
Returnstrue
if the specfiedelement
has children.-
Methods inherited from interface com._1c.g5.aef2.models.IModel
addModelListener, commit, createWorkingCopy, discard, dispose, getChange, getComponent, isOnline, removeModelListener, setComponent
-
Methods inherited from interface com._1c.g5.aef2.validators.IValidable
addValidator, removeValidator, validate, validate
-
-
-
-
Method Detail
-
getElements
Stream<Object> getElements()
Returns a stream of top level objects- Returns:
- a stream of top level objects, never
null
.
-
getChildren
Stream<Object> getChildren(Object element)
Returns a stream of children objects of the specified parentelement
.- Parameters:
element
- the parent object to get its children, cannot benull
.- Returns:
- a stream of children objects, never
null
.
-
hasChildren
boolean hasChildren(Object element)
Returnstrue
if the specfiedelement
has children.- Parameters:
element
- the element to test, cannot benull
.- Returns:
true
if the specfiedelement
has children,false
- otherwise.- See Also:
getChildren(Object)
-
getParent
Optional<Object> getParent(Object element)
Returns the parent object for the specifiedelement
.- Parameters:
element
- the element to get its parent, cannot benull
.- Returns:
- the parent object or
Optional.empty()
if there is no parent element, nevernull
-
-