Skip to content

Commit 9e544a4

Browse files
author
Ben McLean
committed
More documentation
1 parent b2c63c9 commit 9e544a4

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

src/au/com/origma/perspectiveapi/v1alpha1/models/AttributeScore.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,61 @@
88

99
import java.util.List;
1010

11+
/**
12+
* The score of an attribute
13+
*
14+
* @author Ben McLean <ben@origma.com.au>
15+
*
16+
*/
1117
public class AttributeScore {
1218

1319
Score summaryScore;
1420
List<SpanScore> spanScores;
1521

22+
/**
23+
* Create an empty instance
24+
*/
1625
public AttributeScore() {
1726
super();
1827
}
1928

29+
/**
30+
* Create an instance
31+
*/
2032
public AttributeScore(Score summaryScore, List<SpanScore> spanScores) {
2133
super();
2234
this.summaryScore = summaryScore;
2335
this.spanScores = spanScores;
2436
}
2537

38+
/**
39+
* Returns the summary of all span scores
40+
* @return the summary of all span scores
41+
*/
2642
public Score getSummaryScore() {
2743
return summaryScore;
2844
}
2945

46+
/**
47+
* Sets the summary of all span scores
48+
* @param summaryScore the summary of all span scores
49+
*/
3050
public void setSummaryScore(Score summaryScore) {
3151
this.summaryScore = summaryScore;
3252
}
3353

54+
/**
55+
* Returns the scores of spans
56+
* @return the scores of spans
57+
*/
3458
public List<SpanScore> getSpanScores() {
3559
return spanScores;
3660
}
3761

62+
/**
63+
* Sets the scores of spans
64+
* @param spanScores the scores of spans
65+
*/
3866
public void setSpanScores(List<SpanScore> spanScores) {
3967
this.spanScores = spanScores;
4068
}

src/au/com/origma/perspectiveapi/v1alpha1/models/AttributeType.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
*/
77
package au.com.origma.perspectiveapi.v1alpha1.models;
88

9+
/**
10+
* Represents the types of attributes that can be analysed in any given request
11+
*
12+
* @author Ben McLean &lt;ben@origma.com.au&gt;
13+
*
14+
*/
915
public enum AttributeType {
1016

1117
TOXICITY,

0 commit comments

Comments
 (0)