forked from matomo-org/matomo-java-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPiwikLocale.java
More file actions
51 lines (45 loc) · 1.09 KB
/
PiwikLocale.java
File metadata and controls
51 lines (45 loc) · 1.09 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
/*
* Piwik Java Tracker
*
* @link https://github.com/piwik/piwik-java-tracker
* @license https://github.com/piwik/piwik-java-tracker/blob/master/LICENSE BSD-3 Clause
*/
package org.piwik.java.tracking;
import java.util.Locale;
/**
* Object representing a locale required by some Piwik query parameters.
*
* @author brettcsorba
*/
public class PiwikLocale{
private Locale locale;
/**
* Create this PiwikLocale from a Locale.
* @param locale the locale to create this object from
*/
public PiwikLocale(Locale locale){
this.locale = locale;
}
/**
* Gets the locale.
* @return the locale
*/
public Locale getLocale(){
return locale;
}
/**
* Sets the locale.
* @param locale the locale to set
*/
public void setLocale(Locale locale){
this.locale = locale;
}
/**
* Returns the locale's lowercase country code.
* @return the locale's lowercase country code
*/
@Override
public String toString(){
return locale.getCountry().toLowerCase();
}
}