Skip to content

Commit ea151f7

Browse files
author
Ben McLean
committed
Added documentation on Context
1 parent 9e544a4 commit ea151f7

File tree

2 files changed

+30
-13
lines changed

2 files changed

+30
-13
lines changed

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

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

9+
/**
10+
* The format the content is in
11+
*
12+
* @author Ben McLean <ben@origma.com.au>
13+
*
14+
*/
915
public enum ContentType {
1016

17+
/**
18+
* The content is in plain text
19+
*/
1120
PLAIN_TEXT,
21+
/**
22+
* Not currently supported
23+
*/
1224
@Deprecated
1325
HTML;
1426

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

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,40 @@
88

99
import java.util.List;
1010

11+
/**
12+
* Context surrounding the request
13+
*
14+
* @author Ben McLean <ben@origma.com.au>
15+
*/
1116
public class Context {
1217

1318
List<Entry> entries;
1419

15-
public Context() {
16-
super();
17-
}
18-
19-
public Context(List<Entry> entries) {
20-
super();
21-
this.entries = entries;
22-
}
23-
20+
/**
21+
* Returns the context entries
22+
* @return the context entries
23+
*/
2424
public List<Entry> getEntries() {
2525
return entries;
2626
}
2727

28-
public void setEntries(List<Entry> entries) {
29-
this.entries = entries;
30-
}
31-
3228
public static class Builder {
3329
private List<Entry> entries;
3430

31+
/**
32+
* Sets the context entries
33+
* @param entries the context entries
34+
* @return The builder
35+
*/
3536
public Builder entries(List<Entry> entries) {
3637
this.entries = entries;
3738
return this;
3839
}
3940

41+
/**
42+
* Returns a new instance of Context
43+
* @return a new instance of Context
44+
*/
4045
public Context build() {
4146
return new Context(this);
4247
}

0 commit comments

Comments
 (0)