|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcore_lib.Relation
public class Relation
The Relation class describes the prior interaction between two users. It stores both feedbacks and the critical trust value that is calculated by a trust management system (via TrustAlg interface).
Nested Class Summary | |
---|---|
static class |
Relation.Copy
The Copy enumeration differentiates between the different feedback histories which are being stored at the Relation level. |
Field Summary | |
---|---|
private int |
global_neg
The number of globally broadcast negative/unsatisfactory feedbacks. |
private int |
global_pos
The number of globally broadcast positive/satisfactory feedbacks. |
private Relation.Copy |
history
Describes feedback history currently activated on this Relation |
private int |
honest_neg
The number of truly negative/unsatisfactory interactions. |
private int |
honest_pos
The number of truly positive/satisfactory interactions. |
private double |
trust_val
The trust value characterizing this user relationship. |
Constructor Summary | |
---|---|
Relation()
Construct an empty Relation object. |
Method Summary | |
---|---|
int |
getNeg()
Access method to number of negative feedbacks, per 'history' parameter. |
int |
getPos()
Access method to number of positive feedbacks, per 'history' parameter. |
double |
getTrust()
Access method to the trust value. |
void |
incGlobalNeg()
Increment the global-negative feedback count by one |
void |
incGlobalPos()
Increment the global-positive feedback count by one |
void |
incHonestNeg()
Increment the actual negative interaction count by one |
void |
incHonestPos()
Increment the actual positive interaction count by one |
void |
setHistory(Relation.Copy historyStyle)
Set the history store activated for this Relation object. |
void |
setTrust(double new_trust)
Set the trust_value field to a new value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Relation.Copy history
private int global_pos
private int global_neg
private int honest_pos
private int honest_neg
private double trust_val
Constructor Detail |
---|
public Relation()
Method Detail |
---|
public double getTrust()
public void setTrust(double new_trust)
new_trust
- The new value for the trust_value fieldpublic void setHistory(Relation.Copy historyStyle)
historyStyle
- History to be maintained, per Copy enumerationpublic int getPos()
public int getNeg()
public void incGlobalPos()
public void incGlobalNeg()
public void incHonestPos()
public void incHonestNeg()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |