@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AutoCompleteSuggestion that = (AutoCompleteSuggestion) o;
        return value.equals(that.value) &&
                label.equals(that.label);
    }
AutoComplete-REST-Endpoint (indicated via completeEndpoint-attribute) has to return a list of suggestions.
This class may be used to represent one suggestion.
primefaces/src/main/java/org/primefaces/model/rest/AutoCompleteSuggestion.java