BrightSide Workbench Full Report + Source Code
All Classes Namespaces Files Functions Variables Pages
org.turro.contacts.organigram.TargetFinder Class Reference

Public Member Functions

 TargetFinder (Contact root)
 
 TargetFinder (IContact root)
 
ContactList find (TargetArray targets)
 

Detailed Description

Author
Lluis Turró Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 30 of file TargetFinder.java.

Constructor & Destructor Documentation

◆ TargetFinder() [1/2]

org.turro.contacts.organigram.TargetFinder.TargetFinder ( Contact  root)

Definition at line 35 of file TargetFinder.java.

35  {
36  this.root = root;
37  }

◆ TargetFinder() [2/2]

org.turro.contacts.organigram.TargetFinder.TargetFinder ( IContact  root)

Definition at line 39 of file TargetFinder.java.

39  {
40  if(root.isValid()) {
41  this.root = (Contact) root.getContact();
42  }
43  }
Here is the call graph for this function:

Member Function Documentation

◆ find()

ContactList org.turro.contacts.organigram.TargetFinder.find ( TargetArray  targets)

Definition at line 45 of file TargetFinder.java.

45  {
46  selected = new ContactList();
47  for(TargetItem ti : targets) {
48  iterateContacts(root, ti);
49  if(!selected.isEmpty() && ti.getNextOperator().equals(NextOperator.NO_OTHERWISE)) {
50  break;
51  }
52  }
53  if(selected.isEmpty() && targets.getLastItem() != null && targets.getLastItem().equals(LastItem.LI_ANYONE)) {
54  iterateContacts(root, null);
55  }
56  return selected;
57  }
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: