public final class AutocompleteSuggestion extends Object implements Serializable
AutocompleteTextFieldExtension
.
Is can contain the following informations:
value
- The actual value of the suggestiondescription
- An optional descriptionicon
- An optional icon Resource
styleNames
- An optional list of style names
Because value
contains the actual value of this suggestion, the
methods hashCode()
and equals(java.lang.Object)
only take
the value
property into account!
AutocompleteSuggestionProvider
,
AutocompleteTextFieldExtension
,
Serialized FormConstructor and Description |
---|
AutocompleteSuggestion(String value)
Creates a new
AutocompleteSuggestion with the given
value . |
AutocompleteSuggestion(String value,
String description)
|
AutocompleteSuggestion(String value,
String description,
com.vaadin.server.Resource icon)
|
Modifier and Type | Method and Description |
---|---|
void |
addStyleName(String styleName)
Adds one or more style names to the suggestion.
|
boolean |
equals(Object obj) |
String |
getDescription()
Gets the description.
|
com.vaadin.server.Resource |
getIcon()
Gets the icon.
|
String |
getStyleName()
Gets all user-defined CSS style names of the suggestion.
|
List<String> |
getStyleNames()
Gets the style names as unmodifiable
List . |
String |
getValue()
Gets the actual
value of the suggestion. |
int |
hashCode() |
void |
removeStyleName(String styleName)
Removes one or more style names from the suggestion.
|
void |
setDescription(String description)
Sets the description.
|
void |
setIcon(com.vaadin.server.Resource icon)
Sets the icon.
|
void |
setValue(String value)
Sets the actual value of the suggestion.
|
String |
toString() |
public AutocompleteSuggestion(String value) throws NullPointerException
AutocompleteSuggestion
with the given
value
.value
- The actual value
of the suggestion.NullPointerException
- If value
is null
.public AutocompleteSuggestion(String value, String description) throws NullPointerException
value
- The actual value
of the suggestion.description
- The description String
or null
.NullPointerException
- If value
is null
.public AutocompleteSuggestion(String value, String description, com.vaadin.server.Resource icon) throws NullPointerException
value
- The actual value
of the suggestion.description
- The description String
or null
.icon
- The icon Resource
or null
.NullPointerException
- If value
is null
.public String getValue()
value
of the suggestion.value
of the suggestion.public void setValue(String value) throws NullPointerException
A null value
is not allowed!
value
- The value of the suggestion.NullPointerException
- If value
is null
.public String getDescription()
String
or null
.public void setDescription(String description)
description
- The description String
or null
.public com.vaadin.server.Resource getIcon()
Resource
or null
.public void setIcon(com.vaadin.server.Resource icon)
icon
- The icon Resource
or null
.public List<String> getStyleNames()
List
.List
or null
.public String getStyleName()
public void addStyleName(String styleName)
styleName
- The new style to be added to the suggestion.public void removeStyleName(String styleName)
styleName
- The style name or style names to be removed.Copyright © 2016 Max Schuster. All Rights Reserved.