Package com.nomagic.magicdraw.uml
Class Finder.ByNameFinder
java.lang.Object
com.nomagic.magicdraw.uml.Finder.ByNameFinder
- Enclosing class:
 - Finder
 
Search for any first element by simple name among the given root element(s) and direct children of root element(s)
- 
Method Summary
Modifier and TypeMethodDescription<T extends Element>
TFind element by name.<T extends Element>
TFind element by name.<T extends Element>
TFind element by name.<T extends Element>
TFind element by name.<T extends Element>
Tfind(Collection<? extends Element> roots, Class[] type, String name) Find element by name.<T extends Element>
Tfind(Collection<? extends Element> roots, Class[] type, String name, boolean includeRoot) Find element by name.<T extends Element>
Tfind(Collection<? extends Element> roots, Class type, String name) Find element by name.<T extends Element>
Tfind(Collection<? extends Element> roots, Class type, String name, boolean includeRoot) Find element by name.<T extends Element>
TfindFirstInCollection(Collection<T> elements, String name) Find first NameElement in a given collection with a given name<T extends Element>
Collection<T>findInCollection(Collection<T> elements, String name) Find NameElements in a given collection with a given name 
- 
Method Details
- 
find
@CheckForNull public <T extends Element> T find(Element root, @CheckForNull Class type, String name) Find element by name. Include root(s) into a search.- Parameters:
 root- root elementtype- strict class type of element. Nulls means any elementname- Element name- Returns:
 - found Element or null
 
 - 
find
@CheckForNull public <T extends Element> T find(Element root, @CheckForNull Class[] type, String name) Find element by name. Include root(s) into a search.- Parameters:
 root- root elementtype- strict class types of element. Nulls means any elementname- Element name- Returns:
 - found Element or null
 
 - 
find
@CheckForNull public <T extends Element> T find(Element root, @CheckForNull Class type, String name, boolean includeRoot) Find element by name.- Parameters:
 root- root elementtype- strict class type of element. Nulls means any elementname- Element nameincludeRoot- include root element into a search- Returns:
 - found Element or null
 
 - 
find
@CheckForNull public <T extends Element> T find(Element root, @CheckForNull Class[] type, String name, boolean includeRoot) Find element by name.- Parameters:
 root- root elementtype- strict class types of element. Nulls means any elementname- Element nameincludeRoot- include root element into a search- Returns:
 - found Element or null
 
 - 
find
@CheckForNull public <T extends Element> T find(Collection<? extends Element> roots, @CheckForNull Class[] type, String name) Find element by name. Include root(s) into a search.- Parameters:
 roots- root elementstype- strict class types of element. Nulls means any elementname- Element name- Returns:
 - found Element or null
 
 - 
find
@CheckForNull public <T extends Element> T find(Collection<? extends Element> roots, @CheckForNull Class type, String name) Find element by name. Include root(s) into a search.- Parameters:
 roots- root elementstype- strict class type of element. Nulls means any elementname- Element name- Returns:
 - found Element or null
 
 - 
find
@CheckForNull public <T extends Element> T find(Collection<? extends Element> roots, @CheckForNull Class type, String name, boolean includeRoot) Find element by name.- Parameters:
 roots- root elementtype- strict class type of element. Nulls means any elementname- Element nameincludeRoot- include root element into a search- Returns:
 - found Element or null
 
 - 
find
@CheckForNull public <T extends Element> T find(Collection<? extends Element> roots, @CheckForNull Class[] type, String name, boolean includeRoot) Find element by name.- Parameters:
 roots- root elementtype- strict class types of element. Nulls means any elementname- Element nameincludeRoot- include root element into a search- Returns:
 - found Element or null
 
 - 
findInCollection
Find NameElements in a given collection with a given name- Parameters:
 elements- elementsname- element name- Returns:
 - found Elements
 
 - 
findFirstInCollection
@CheckForNull public <T extends Element> T findFirstInCollection(Collection<T> elements, String name) Find first NameElement in a given collection with a given name- Parameters:
 elements- elementsname- element name- Returns:
 - found Element
 
 
 -