aboutsummaryrefslogtreecommitdiffstats
path: root/linguistics/src/main/java/com/yahoo/language/detect/Hint.java
blob: 5d8b0a79c5d632571376b9d40de46d31263fbc66 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.language.detect;

/**
 * A hint that can be given to a {@link Detector}.
 *
 * @author Einar M R Rosenvinge
 */
public class Hint {

    private final String market;
    private final String country;

    private Hint(String market, String country) {
        this.market = market;
        this.country = country;
    }

    public String getMarket() {
        return market;
    }

    public String getCountry() {
        return country;
    }

    public static Hint newMarketHint(String market) {
        return new Hint(market, null);
    }

    public static Hint newCountryHint(String country) {
        return new Hint(null, country);
    }

    public static Hint newInstance(String market, String country) {
        return new Hint(market, country);
    }

}