public class SuggesterGroupDescriptor extends Object implements Cloneable
Constructor and Description |
---|
SuggesterGroupDescriptor() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
append(String suggesterName,
String newSuggesterName,
boolean before)
Unless a suggester named
newSuggesterName already exists in the #suggesters list, appends a new
SuggesterGroupItemDescriptor named newSuggesterName just before (if before is true) or
after the suggester named suggesterName in the #suggesters list. |
protected boolean |
appendAfter(String suggesterName,
String newSuggesterName)
Unless a suggester named
newSuggesterName already exists in the #suggesters list, appends a new
SuggesterGroupItemDescriptor named newSuggesterName just after the suggester named
suggesterName in the #suggesters list. |
protected boolean |
appendBefore(String suggesterName,
String newSuggesterName)
Unless a suggester named
newSuggesterName already exists in the #suggesters list, appends a new
SuggesterGroupItemDescriptor named newSuggesterName just before the suggester named
suggesterName in the #suggesters list. |
Object |
clone() |
String |
getName() |
List<SuggesterGroupItemDescriptor> |
getSuggesters() |
protected int |
indexOf(String suggesterName)
Returns the index of the first occurrence of the element named
suggesterName in the #suggesters
list, or -1 if suggesterName is null or if this list does not contain the element. |
protected void |
logExistingSuggesterName(String newSuggesterName)
Logs that the suggester named
newSuggesterName already exists in the #suggesters list and
therefore won't be appended to it. |
void |
mergeFrom(SuggesterGroupDescriptor newDescriptor) |
protected boolean |
remove(String suggesterName)
Removes the suggester named
suggesterName from the #suggesters list. |
public SuggesterGroupDescriptor()
public List<SuggesterGroupItemDescriptor> getSuggesters()
public void mergeFrom(SuggesterGroupDescriptor newDescriptor) throws ComponentInitializationException
ComponentInitializationException
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
protected boolean remove(String suggesterName)
suggesterName
from the #suggesters
list.suggesterName
- the suggester nameprotected int indexOf(String suggesterName)
suggesterName
in the #suggesters
list, or -1 if suggesterName
is null or if this list does not contain the element.suggesterName
- the suggester namesuggesterName
in the #suggesters
list, or -1 if suggesterName
is null or if this list does not contain the elementprotected boolean appendBefore(String suggesterName, String newSuggesterName)
newSuggesterName
already exists in the #suggesters
list, appends a new
SuggesterGroupItemDescriptor
named newSuggesterName
just before the suggester named
suggesterName
in the #suggesters
list. If the suggester named suggesterName
does not
exist, appends the new suggester at the beginning of the list.suggesterName
- the suggester namenewSuggesterName
- the name of the suggester to appendnewSuggesterName
was appended to the #suggesters
listprotected boolean appendAfter(String suggesterName, String newSuggesterName)
newSuggesterName
already exists in the #suggesters
list, appends a new
SuggesterGroupItemDescriptor
named newSuggesterName
just after the suggester named
suggesterName
in the #suggesters
list. If the suggester named suggesterName
does not
exist, appends the new suggester at the end of the list.suggesterName
- the suggester namenewSuggesterName
- the name of the suggester to appendnewSuggesterName
was appended to the #suggesters
listprotected boolean append(String suggesterName, String newSuggesterName, boolean before)
newSuggesterName
already exists in the #suggesters
list, appends a new
SuggesterGroupItemDescriptor
named newSuggesterName
just before (if before
is true) or
after the suggester named suggesterName
in the #suggesters
list. If the suggester named
suggesterName
does not exist, appends the new suggester at the beginning or the end of the list,
depending on before
.suggesterName
- the suggester namenewSuggesterName
- the name of the suggester to appendnewSuggesterName
was appended to the #suggesters
listprotected void logExistingSuggesterName(String newSuggesterName)
newSuggesterName
already exists in the #suggesters
list and
therefore won't be appended to it.newSuggesterName
- the new suggester nameCopyright © 2015 Nuxeo SA. All rights reserved.