19 package org.turro.contacts.util;
21 import org.turro.string.Strings;
22 import org.turro.contacts.Contact;
23 import org.turro.i18n.I_;
24 import org.turro.util.Chars;
25 import org.turro.util.PhraseBuilder;
33 private final Contact self, related;
34 private final String description, relationType;
35 private final boolean preferential;
39 this.related = related;
40 this.description = description;
41 this.relationType = relationType;
42 this.preferential = preferential;
67 if(formated !=
null) result += formated + Chars.forward().spaced();
68 if(related !=
null) result +=
" " + related.
getName();
73 PhraseBuilder pb =
new PhraseBuilder();
74 if(!Strings.isBlank(relationType)) {
75 pb.addWord(
I_.
byKey(relationType.substring(1)));
77 pb.addWord(description);
static String byKey(String key)