forked from intercom/intercom-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConversationCollection.java
More file actions
44 lines (32 loc) · 1.08 KB
/
Copy pathConversationCollection.java
File metadata and controls
44 lines (32 loc) · 1.08 KB
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
package io.intercom.api;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Iterator;
import java.util.List;
@SuppressWarnings("UnusedDeclaration")
@JsonIgnoreProperties(ignoreUnknown = true)
public class ConversationCollection extends TypedDataCollection<Conversation> implements Iterator<Conversation> {
protected TypedDataCollectionIterator<Conversation> iterator;
public ConversationCollection() {
type = "conversation.list";
iterator = new TypedDataCollectionIterator<Conversation>(this);
}
@SuppressWarnings("EmptyMethod")
@JsonProperty("conversations")
public List<Conversation> getPage() {
return super.getPage();
}
@Override
public ConversationCollection nextPage() {
return fetchNextPage(ConversationCollection.class);
}
public boolean hasNext() {
return iterator.hasNext();
}
public Conversation next() {
return iterator.next();
}
public void remove() {
iterator.remove();
}
}