forked from matomo-org/matomo-java-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomVariable.java
More file actions
48 lines (44 loc) · 1.15 KB
/
CustomVariable.java
File metadata and controls
48 lines (44 loc) · 1.15 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
/*
* 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;
/**
* A user defined custom variable.
* @author brettcsorba
*/
public final class CustomVariable{
private final String key;
private final String value;
/**
* Create a new CustomVariable
* @param key the key of this CustomVariable
* @param value the value of this CustomVariable
*/
public CustomVariable(String key, String value){
if (key == null){
throw new NullPointerException("Key cannot be null.");
}
if (value == null){
throw new NullPointerException("Value cannot be null.");
}
this.key = key;
this.value = value;
}
/**
* Get the key of this CustomVariable
* @return the key of this CustomVariable
*/
public String getKey() {
return key;
}
/**
* Get the value of this CustomVariable
* @return the value of this CustomVariable
*/
public String getValue() {
return value;
}
}