1 package org.vaadin.aceeditor;
2
3 import org.vaadin.aceeditor.client.TransportSuggestion;
4
5
6
7
8
9
10 public class Suggestion {
11
12 private final String displayText;
13 private final String descriptionText;
14 private final String suggestionText;
15
16
17
18
19
20
21
22
23 public Suggestion(String displayText,
24 String descriptionText) {
25 this(displayText, descriptionText, "");
26 }
27
28
29
30
31
32
33
34
35
36
37
38
39 public Suggestion(String displayText,
40 String descriptionText, String suggestionText) {
41 this.displayText = displayText;
42 this.descriptionText = descriptionText;
43 this.suggestionText = suggestionText;
44 }
45
46 public TransportSuggestion asTransport(int index) {
47 TransportSuggestion ts = new TransportSuggestion();
48 ts.displayText = displayText;
49 ts.descriptionText = descriptionText;
50 ts.suggestionText = suggestionText;
51 ts.index = index;
52 return ts;
53 }
54
55 public String getDisplayText() {
56 return displayText;
57 }
58
59 public String getDescriptionText() {
60 return descriptionText;
61 }
62
63 public String getSuggestionText() {
64 return suggestionText;
65 }
66
67
68 }