com.github.theresasogunle.ApiQuery   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 24
rs 10
wmc 3

5 Methods

Rating   Name   Duplication   Size   Complexity  
A putParams(String,Object) 0 2 1
putParams 0 2 ?
getParams 0 2 ?
A ApiQuery() 0 2 1
A getParams() 0 2 1
1
package com.github.theresasogunle;
2
3
import java.util.HashMap;
4
5
6
public class ApiQuery {
7
8
   final private HashMap<String, Object> queryMap;
0 ignored issues
show
Coding Style introduced by
The modifiers are customarily declared int the following order: annotations, scope (public, protected, private), abstract, static, final, transient, volatile, synchronized, native, strictfp. Consider reordering your modifiers to comply with this custom.

The Java specification lists the customary order.

Loading history...
9
10
    /**
11
     * Initializes a new query map
12
     */
13
    public ApiQuery() {
14
        this.queryMap = new HashMap<>();
15
    }
16
17
    /**
18
     * Used to add a parameter to the query map
19
     *
20
     * @param key
21
     * @param value
22
     */
23
    public void putParams(String key, Object value) {
24
        this.queryMap.put(key, value);
25
    }
26
27
    
28
    public HashMap<String, Object> getParams() {
0 ignored issues
show
Best Practice introduced by
It is considered good practice to use the Java Collections API interfaces over specific implementations to define public objects and methods. Consider changing the return type of this method from HashMap to Map.
Loading history...
29
        return this.queryMap;
30
    }
31
32
}
33