aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/query/textserialize/item/WordConverter.java
blob: cd9cee73affcda23bfafb9dc7b36dc6ae82f9245 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.search.query.textserialize.item;

import com.yahoo.prelude.query.TermItem;
import com.yahoo.prelude.query.WordItem;

/**
 * @author Tony Vaagenes
 */
public class WordConverter extends TermConverter {
    @Override
    WordItem newTermItem(String word) {
        return new WordItem(word);
    }

    @Override
    protected String getValue(TermItem item) {
        return ((WordItem)item).getWord();
    }
}