Update license to GPLv3, fix header comments
[jFCPlib.git] / src / main / java / net / pterodactylus / fcp / plugin / CalculatedTrust.java
1 /*
2  * jFCPlib - CalculatedTrust.java - Copyright © 2009–2016 David Roden
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17
18 package net.pterodactylus.fcp.plugin;
19
20 /**
21  * Container that stores the trust that is calculated by taking all trustees
22  * and their trust lists into account.
23  *
24  * @author David ‘Bombe’ Roden &lt;bombe@freenetproject.org&gt;
25  */
26 public class CalculatedTrust {
27
28         /** The calculated trust value. */
29         private final Byte trust;
30
31         /** The calculated score value. */
32         private final Integer score;
33
34         /** The calculated rank. */
35         private final Integer rank;
36
37         /**
38          * Creates a new calculated trust container.
39          *
40          * @param trust
41          *            The calculated trust value
42          * @param score
43          *            The calculated score value
44          * @param rank
45          *            The calculated rank of the
46          */
47         public CalculatedTrust(Byte trust, Integer score, Integer rank) {
48                 this.trust = trust;
49                 this.score = score;
50                 this.rank = rank;
51         }
52
53         /**
54          * Returns the calculated trust value.
55          *
56          * @return The calculated trust value, or {@code null} if the trust
57          *         value is not known
58          */
59         public Byte getTrust() {
60                 return trust;
61         }
62
63         /**
64          * Returns the calculated score value.
65          *
66          * @return The calculated score value, or {@code null} if the score
67          *         value is not known
68          */
69         public Integer getScore() {
70                 return score;
71         }
72
73         /**
74          * Returns the calculated rank.
75          *
76          * @return The calculated rank, or {@code null} if the rank is not known
77          */
78         public Integer getRank() {
79                 return rank;
80         }
81
82 }