aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/query/textserialize/item/IntConverter.java
blob: 9495e2c7e94e432286ea78bfefcde12555865f50 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright Yahoo. 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.IntItem;
import com.yahoo.prelude.query.TermItem;

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

    @Override
    protected String getValue(TermItem item) {
        return ((IntItem)item).getNumber();
    }
}