summaryrefslogtreecommitdiff
path: root/src/utils/Tags.java
blob: f1a5b568f58fbdf3b6bfd7ebc847037e487434da (plain)
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
52
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package utils;

/**
 *
 * @author skumar34
 */
public class Tags implements Comparable{
    public String key;
    public double value;

    public Tags()
    {

    }

    public Tags(String key, double value) {
        this.key = key;
        this.value = value;
    }
     public int compareTo(Object obj)
        {
            Tags tempObject=new Tags();
            tempObject=(Tags) obj;
            if(this.value>tempObject.value)
                return 1;
            if(this.value<tempObject.value)
                return -1;
            else
                return 0;
        }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public double getValue() {
        return value;
    }

    public void setValue(double value) {
        this.value = value;
    }
}