BrightSide Workbench Full Report + Source Code
org.turro.plugin.contacts.ContactList Class Reference
Inheritance diagram for org.turro.plugin.contacts.ContactList:
Collaboration diagram for org.turro.plugin.contacts.ContactList:

Public Member Functions

boolean add (IContact e)
 
boolean addObject (Object e)
 
boolean addAll (Collection<? extends IContact > collection)
 
String getCommaSeparatedId ()
 
String getCommaSeparatedEmails ()
 
List< IContactgetCompanies ()
 
List< IContactgetWorkers ()
 
List< IContactgetCenters ()
 
List< IContactgetStudents ()
 
Collection< IContactgetBusiness ()
 
Collection< IContactgetCoworkers ()
 
boolean add (IContact e)
 
boolean contains (IContact e)
 
String getCommaSeparatedId ()
 

Detailed Description

Member Function Documentation

◆ add() [1/2]

boolean org.turro.plugin.contacts.ContactList.add ( IContact  e)

Definition at line 30 of file Elephant/elephant-plugins/src/main/java/org/turro/plugin/contacts/ContactList.java.

30  {
31  if(e == null || !e.isValid()) return false;
32  if(!contains(e)) {
33  return super.add(e);
34  }
35  return false;
36  }
Here is the call graph for this function:

◆ add() [2/2]

boolean org.turro.plugin.contacts.ContactList.add ( IContact  e)

Definition at line 35 of file Elephant/elephant/src/main/java/org/turro/plugin/contacts/ContactList.java.

35  {
36  if(e == null || !e.isValid()) return false;
37  if(!contains(e)) {
38  return super.add(e);
39  }
40  return false;
41  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addAll()

boolean org.turro.plugin.contacts.ContactList.addAll ( Collection<? extends IContact collection)

Definition at line 49 of file Elephant/elephant/src/main/java/org/turro/plugin/contacts/ContactList.java.

49  {
50  for(IContact c : collection) {
51  add(c);
52  }
53  return true;
54  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addObject()

boolean org.turro.plugin.contacts.ContactList.addObject ( Object  e)

Definition at line 43 of file Elephant/elephant/src/main/java/org/turro/plugin/contacts/ContactList.java.

43  {
44  if(e == null) return false;
45  return super.add(Contacts.getContact(e));
46  }
Here is the call graph for this function:

◆ contains()

boolean org.turro.plugin.contacts.ContactList.contains ( IContact  e)

Definition at line 38 of file Elephant/elephant-plugins/src/main/java/org/turro/plugin/contacts/ContactList.java.

38  {
39  if(e == null || !e.isValid()) return false;
40  for(IContact ic : this) {
41  if(ic.getId().equals(e.getId())) {
42  return true;
43  }
44  }
45  return false;
46  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getBusiness()

Collection<IContact> org.turro.plugin.contacts.ContactList.getBusiness ( )

Definition at line 92 of file Elephant/elephant/src/main/java/org/turro/plugin/contacts/ContactList.java.

92  {
93  ContactList list = new ContactList();
94  for(IContact contact : this) {
95  List<IContact> l = contact.getBusinessList();
96  if(l == null || l.isEmpty()) {
97  l.add(contact);
98  }
99  list.addAll(l);
100  }
101  return list;
102  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCenters()

List<IContact> org.turro.plugin.contacts.ContactList.getCenters ( )

Definition at line 84 of file Elephant/elephant/src/main/java/org/turro/plugin/contacts/ContactList.java.

84  {
85  return this.stream().filter(c -> c.isCenter()).collect(Collectors.toList());
86  }

◆ getCommaSeparatedEmails()

String org.turro.plugin.contacts.ContactList.getCommaSeparatedEmails ( )

Definition at line 65 of file Elephant/elephant/src/main/java/org/turro/plugin/contacts/ContactList.java.

65  {
66  PhraseBuilder pb = new PhraseBuilder();
67  for(IContact c : this) {
68  if(c != null && c.isWebUser()) {
69  pb.addWord(c.getConnector(IUser.CONNECTOR_EMAIL));
70  pb.addPendingSeparator(",");
71  }
72  }
73  return pb.toString();
74  }
Here is the call graph for this function:

◆ getCommaSeparatedId() [1/2]

String org.turro.plugin.contacts.ContactList.getCommaSeparatedId ( )

Definition at line 48 of file Elephant/elephant-plugins/src/main/java/org/turro/plugin/contacts/ContactList.java.

48  {
49  PhraseBuilder pb = new PhraseBuilder();
50  for(IContact c : this) {
51  pb.addWord("'" + c.getId() + "'");
52  pb.addPendingSeparator(",");
53  }
54  return pb.toString();
55  }
Here is the call graph for this function:

◆ getCommaSeparatedId() [2/2]

String org.turro.plugin.contacts.ContactList.getCommaSeparatedId ( )

Definition at line 56 of file Elephant/elephant/src/main/java/org/turro/plugin/contacts/ContactList.java.

56  {
57  PhraseBuilder pb = new PhraseBuilder();
58  for(IContact c : this) {
59  pb.addWord("'" + c.getId() + "'");
60  pb.addPendingSeparator(",");
61  }
62  return pb.toString();
63  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCompanies()

List<IContact> org.turro.plugin.contacts.ContactList.getCompanies ( )

Definition at line 76 of file Elephant/elephant/src/main/java/org/turro/plugin/contacts/ContactList.java.

76  {
77  return this.stream().filter(c -> c.isCompany()).collect(Collectors.toList());
78  }

◆ getCoworkers()

Collection<IContact> org.turro.plugin.contacts.ContactList.getCoworkers ( )

Definition at line 104 of file Elephant/elephant/src/main/java/org/turro/plugin/contacts/ContactList.java.

104  {
105  ContactList list = new ContactList();
106  for(IContact contact : getBusiness()) {
107  list.addAll(contact.getCoworkers());
108  }
109  return list;
110  }
Here is the call graph for this function:

◆ getStudents()

List<IContact> org.turro.plugin.contacts.ContactList.getStudents ( )

Definition at line 88 of file Elephant/elephant/src/main/java/org/turro/plugin/contacts/ContactList.java.

88  {
89  return this.stream().filter(c -> c.isStudent()).collect(Collectors.toList());
90  }

◆ getWorkers()

List<IContact> org.turro.plugin.contacts.ContactList.getWorkers ( )

Definition at line 80 of file Elephant/elephant/src/main/java/org/turro/plugin/contacts/ContactList.java.

80  {
81  return this.stream().filter(c -> c.isWorker()).collect(Collectors.toList());
82  }

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