BrightSide Workbench Full Report + Source Code
org.turro.contacts.util.RelationAdapter Class Reference
Collaboration diagram for org.turro.contacts.util.RelationAdapter:

Public Member Functions

 RelationAdapter (Contact self, Contact related, String description, String relationType, boolean preferential)
 
Contact getSelf ()
 
Contact getRelated ()
 
String getDescription ()
 
String getRelationType ()
 
boolean isPreferential ()
 
String getFullRelationString ()
 
String getRelationString ()
 

Detailed Description

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

Definition at line 31 of file RelationAdapter.java.

Constructor & Destructor Documentation

◆ RelationAdapter()

org.turro.contacts.util.RelationAdapter.RelationAdapter ( Contact  self,
Contact  related,
String  description,
String  relationType,
boolean  preferential 
)

Definition at line 37 of file RelationAdapter.java.

37  {
38  this.self = self;
39  this.related = related;
40  this.description = description;
41  this.relationType = relationType;
42  this.preferential = preferential;
43  }

Member Function Documentation

◆ getDescription()

String org.turro.contacts.util.RelationAdapter.getDescription ( )

Definition at line 53 of file RelationAdapter.java.

53  {
54  return description;
55  }

◆ getFullRelationString()

String org.turro.contacts.util.RelationAdapter.getFullRelationString ( )

Definition at line 65 of file RelationAdapter.java.

65  {
66  String result = "", formated = getRelationString();
67  if(formated != null) result += formated + Chars.forward().spaced();
68  if(related != null) result += " " + related.getName();
69  return result;
70  }
Here is the call graph for this function:

◆ getRelated()

Contact org.turro.contacts.util.RelationAdapter.getRelated ( )

Definition at line 49 of file RelationAdapter.java.

49  {
50  return related;
51  }

◆ getRelationString()

String org.turro.contacts.util.RelationAdapter.getRelationString ( )

Definition at line 72 of file RelationAdapter.java.

72  {
73  PhraseBuilder pb = new PhraseBuilder();
74  if(!Strings.isBlank(relationType)) {
75  pb.addWord(I_.byKey(relationType.substring(1)));
76  }
77  pb.addWord(description);
78  if(!pb.isBlank()) {
79  return pb.toString();
80  } else {
81  return "**";
82  }
83  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRelationType()

String org.turro.contacts.util.RelationAdapter.getRelationType ( )

Definition at line 57 of file RelationAdapter.java.

57  {
58  return relationType;
59  }

◆ getSelf()

Contact org.turro.contacts.util.RelationAdapter.getSelf ( )

Definition at line 45 of file RelationAdapter.java.

45  {
46  return self;
47  }

◆ isPreferential()

boolean org.turro.contacts.util.RelationAdapter.isPreferential ( )

Definition at line 61 of file RelationAdapter.java.

61  {
62  return preferential;
63  }

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