Package com.nomagic.magicdraw.uml
Class Finder.ByScopeFinder
- java.lang.Object
-
- com.nomagic.magicdraw.uml.Finder.ByScopeFinder
-
- Enclosing class:
- Finder
public static final class Finder.ByScopeFinder extends java.lang.Object
Search for all elements in the given root element(s) and all(direct and indirect) children of root element(s)
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ByScopeFinder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends Element>
java.util.Collection<T>find(Project project)
Collects all elements from a given project.<T extends Element>
java.util.Collection<T>find(Project project, boolean includeRoot)
Collects all elements from a given project.<T extends Element>
java.util.Collection<T>find(Element root)
Collects all elements from a given root.Root element is included<T extends Element>
java.util.Collection<T>find(Element root, boolean includeRoot)
Collects all elements from a given root<T extends Element>
java.util.Collection<T>find(java.util.Collection<? extends Element> roots)
Collects all elements from a given root.<T extends Element>
java.util.Collection<T>find(java.util.Collection<? extends Element> roots, boolean includeRoot)
Collects all elements from a given root<T extends BaseElement>
java.util.Collection<T>findIncludingPresentationElements(Project project)
Collects all elements from a given project including PresentationElements.<T extends BaseElement>
java.util.Collection<T>findIncludingPresentationElements(Project project, boolean includeRoot)
Collects all elements from a given project including PresentationElements<T extends BaseElement>
java.util.Collection<T>findIncludingPresentationElements(Element root)
Collects all elements from a given root including PresentationElements.<T extends BaseElement>
java.util.Collection<T>findIncludingPresentationElements(Element root, boolean includeRoot)
Collects all elements from a given root including PresentationElements<T extends BaseElement>
java.util.Collection<T>findIncludingPresentationElements(java.util.Collection<? extends Element> roots)
Collects all elements from a given root including PresentationElements.<T extends BaseElement>
java.util.Collection<T>findIncludingPresentationElements(java.util.Collection<? extends Element> roots, boolean includeRoot)
Collects all elements from a given root including PresentationElementsprivate static <T extends BaseElement>
java.util.Collection<T>internalCollectChildrenRecursively(java.util.Collection<? extends Element> roots, boolean includeRoot, boolean includePresentationElements)
private static java.util.Collection<BaseElement>
internalGetPresentationElements(Diagram diagram)
private static <T extends BaseElement>
CloseableIterator<T>internalIterator(java.util.Collection<? extends Element> roots, boolean includeRoot, boolean collectPresentationElements)
<T extends Element>
CloseableIterator<T>iterator(Project project)
Create iterator for iterating content of given project including root models of project.<T extends Element>
CloseableIterator<T>iterator(Project project, boolean includeRoot)
Create iterator for iterating content from a given root.<T extends Element>
CloseableIterator<T>iterator(Element root)
Create iterator for iterating content from a given root including it.<T extends Element>
CloseableIterator<T>iterator(Element root, boolean includeRoot)
Create iterator for iterating content from a given root.<T extends Element>
CloseableIterator<T>iterator(java.util.Collection<? extends Element> roots)
Create iterator for iterating content from a given roots including them.<T extends Element>
CloseableIterator<T>iterator(java.util.Collection<? extends Element> roots, boolean includeRoot)
Create iterator for iterating content from a given root.<T extends BaseElement>
CloseableIterator<T>iteratorIncludingPresentationElements(Project project)
Create iterator for iterating content of given Project including PresentationElements and project root models<T extends BaseElement>
CloseableIterator<T>iteratorIncludingPresentationElements(Project project, boolean includeRoot)
Create iterator for iterating content of whole Project including PresentationElements<T extends BaseElement>
CloseableIterator<T>iteratorIncludingPresentationElements(Element root)
Create iterator for iterating content from a given root including PresentationElements and root<T extends BaseElement>
CloseableIterator<T>iteratorIncludingPresentationElements(Element root, boolean includeRoot)
Create iterator for iterating content from a given root including PresentationElements<T extends BaseElement>
CloseableIterator<T>iteratorIncludingPresentationElements(java.util.Collection<? extends Element> roots)
Create iterator for iterating content from a given root including PresentationElements and roots<T extends BaseElement>
CloseableIterator<T>iteratorIncludingPresentationElements(java.util.Collection<? extends Element> roots, boolean includeRoot)
Create iterator for iterating content from a given root including PresentationElements
-
-
-
Method Detail
-
iterator
public <T extends Element> CloseableIterator<T> iterator(Element root)
Create iterator for iterating content from a given root including it.- Parameters:
root
- root elements- Returns:
- elements iterator
-
iterator
public <T extends Element> CloseableIterator<T> iterator(Project project)
Create iterator for iterating content of given project including root models of project.- Parameters:
project
- project- Returns:
- elements iterator
-
iterator
public <T extends Element> CloseableIterator<T> iterator(java.util.Collection<? extends Element> roots)
Create iterator for iterating content from a given roots including them.- Parameters:
roots
- root elements- Returns:
- elements iterator
-
iteratorIncludingPresentationElements
public <T extends BaseElement> CloseableIterator<T> iteratorIncludingPresentationElements(Element root)
Create iterator for iterating content from a given root including PresentationElements and root- Parameters:
root
- root elements- Returns:
- elements iterator
-
iteratorIncludingPresentationElements
public <T extends BaseElement> CloseableIterator<T> iteratorIncludingPresentationElements(Project project)
Create iterator for iterating content of given Project including PresentationElements and project root models- Returns:
- elements iterator
-
iteratorIncludingPresentationElements
public <T extends BaseElement> CloseableIterator<T> iteratorIncludingPresentationElements(java.util.Collection<? extends Element> roots)
Create iterator for iterating content from a given root including PresentationElements and roots- Parameters:
roots
- root elements- Returns:
- elements iterator
-
iterator
public <T extends Element> CloseableIterator<T> iterator(Element root, boolean includeRoot)
Create iterator for iterating content from a given root.- Parameters:
root
- root elementincludeRoot
- include roots- Returns:
- elements iterator
-
iterator
public <T extends Element> CloseableIterator<T> iterator(Project project, boolean includeRoot)
Create iterator for iterating content from a given root.- Parameters:
project
- projectincludeRoot
- include roots- Returns:
- elements iterator
-
iterator
public <T extends Element> CloseableIterator<T> iterator(java.util.Collection<? extends Element> roots, boolean includeRoot)
Create iterator for iterating content from a given root.- Parameters:
roots
- root elementsincludeRoot
- include roots- Returns:
- elements iterator
-
iteratorIncludingPresentationElements
public <T extends BaseElement> CloseableIterator<T> iteratorIncludingPresentationElements(Element root, boolean includeRoot)
Create iterator for iterating content from a given root including PresentationElements- Parameters:
root
- root elementsincludeRoot
- include roots- Returns:
- elements iterator
-
iteratorIncludingPresentationElements
public <T extends BaseElement> CloseableIterator<T> iteratorIncludingPresentationElements(Project project, boolean includeRoot)
Create iterator for iterating content of whole Project including PresentationElements- Parameters:
project
- projectincludeRoot
- include roots- Returns:
- elements iterator
-
iteratorIncludingPresentationElements
public <T extends BaseElement> CloseableIterator<T> iteratorIncludingPresentationElements(java.util.Collection<? extends Element> roots, boolean includeRoot)
Create iterator for iterating content from a given root including PresentationElements- Parameters:
roots
- root elementsincludeRoot
- include roots- Returns:
- elements iterator
-
find
public <T extends Element> java.util.Collection<T> find(Project project, boolean includeRoot)
Collects all elements from a given project.- Parameters:
project
- projectincludeRoot
- include project root models- Returns:
- elements
-
find
public <T extends Element> java.util.Collection<T> find(Element root, boolean includeRoot)
Collects all elements from a given root- Parameters:
root
- root elementincludeRoot
- include root into result- Returns:
- elements
-
find
public <T extends Element> java.util.Collection<T> find(java.util.Collection<? extends Element> roots, boolean includeRoot)
Collects all elements from a given root- Parameters:
roots
- root elementsincludeRoot
- includes root into result- Returns:
- elements
-
find
public <T extends Element> java.util.Collection<T> find(Project project)
Collects all elements from a given project. Project root models are included.- Parameters:
project
- project- Returns:
- elements
-
find
public <T extends Element> java.util.Collection<T> find(Element root)
Collects all elements from a given root.Root element is included- Parameters:
root
- root element- Returns:
- elements
-
find
public <T extends Element> java.util.Collection<T> find(java.util.Collection<? extends Element> roots)
Collects all elements from a given root. Root elements are included- Parameters:
roots
- root elements- Returns:
- elements
-
findIncludingPresentationElements
public <T extends BaseElement> java.util.Collection<T> findIncludingPresentationElements(Project project)
Collects all elements from a given project including PresentationElements. Project root models are included.- Parameters:
project
- project- Returns:
- elements
-
findIncludingPresentationElements
public <T extends BaseElement> java.util.Collection<T> findIncludingPresentationElements(Element root)
Collects all elements from a given root including PresentationElements. Root element is included.- Parameters:
root
- root element- Returns:
- elements
-
findIncludingPresentationElements
public <T extends BaseElement> java.util.Collection<T> findIncludingPresentationElements(java.util.Collection<? extends Element> roots)
Collects all elements from a given root including PresentationElements. Root elements are included.- Parameters:
roots
- roots element- Returns:
- elements
-
findIncludingPresentationElements
public <T extends BaseElement> java.util.Collection<T> findIncludingPresentationElements(Project project, boolean includeRoot)
Collects all elements from a given project including PresentationElements- Parameters:
project
- projectincludeRoot
- include project root models- Returns:
- elements
-
findIncludingPresentationElements
public <T extends BaseElement> java.util.Collection<T> findIncludingPresentationElements(Element root, boolean includeRoot)
Collects all elements from a given root including PresentationElements- Parameters:
root
- root elementincludeRoot
- include project root models- Returns:
- elements
-
findIncludingPresentationElements
public <T extends BaseElement> java.util.Collection<T> findIncludingPresentationElements(java.util.Collection<? extends Element> roots, boolean includeRoot)
Collects all elements from a given root including PresentationElements- Parameters:
roots
- roots elementincludeRoot
- include project root models- Returns:
- elements
-
internalIterator
private static <T extends BaseElement> CloseableIterator<T> internalIterator(java.util.Collection<? extends Element> roots, boolean includeRoot, boolean collectPresentationElements)
-
internalCollectChildrenRecursively
private static <T extends BaseElement> java.util.Collection<T> internalCollectChildrenRecursively(java.util.Collection<? extends Element> roots, boolean includeRoot, boolean includePresentationElements)
-
internalGetPresentationElements
private static java.util.Collection<BaseElement> internalGetPresentationElements(Diagram diagram)
-
-