File tree Expand file tree Collapse file tree 14 files changed +39
-225
lines changed
intercom-java/src/main/java/io/intercom/api Expand file tree Collapse file tree 14 files changed +39
-225
lines changed Original file line number Diff line number Diff line change 44import com .fasterxml .jackson .annotation .JsonInclude ;
55import com .fasterxml .jackson .annotation .JsonProperty ;
66
7- import java .util .Iterator ;
87import java .util .List ;
98
109@ SuppressWarnings ("UnusedDeclaration" )
1110@ JsonIgnoreProperties (ignoreUnknown = true )
1211@ JsonInclude (JsonInclude .Include .NON_EMPTY )
13- public class AdminCollection extends TypedDataCollection <Admin > implements Iterator <Admin > {
14- protected TypedDataCollectionIterator <Admin > iterator ;
12+ public class AdminCollection extends TypedDataCollection <Admin > {
1513
1614 public AdminCollection () {
1715 type = "company.list" ;
18- iterator = new TypedDataCollectionIterator <Admin >(this );
1916 }
2017
2118 @ Override
@@ -29,17 +26,4 @@ public AdminCollection nextPage() {
2926 public List <Admin > getPage () {
3027 return super .getPage ();
3128 }
32-
33- public boolean hasNext () {
34- return iterator .hasNext ();
35- }
36-
37- public Admin next () {
38- return iterator .next ();
39- }
40-
41- public void remove () {
42- iterator .remove ();
43- }
44-
4529}
Original file line number Diff line number Diff line change 33import com .fasterxml .jackson .annotation .JsonIgnoreProperties ;
44import com .fasterxml .jackson .annotation .JsonProperty ;
55
6- import java .util .Iterator ;
76import java .util .List ;
87
98@ SuppressWarnings ("UnusedDeclaration" )
109@ JsonIgnoreProperties (ignoreUnknown = true )
11- public class CompanyCollection extends TypedDataCollection <Company > implements Iterator <Company > {
12-
13- protected TypedDataCollectionIterator <Company > iterator ;
10+ public class CompanyCollection extends TypedDataCollection <Company > {
1411
1512 @ JsonProperty ("total_count" )
1613 private long totalCount ;
1714
1815 public CompanyCollection () {
1916 type = "company.list" ;
20- iterator = new TypedDataCollectionIterator <Company >(this );
2117 }
2218
2319 public CompanyCollection (List <Company > companies ) {
@@ -41,18 +37,6 @@ public CompanyCollection nextPage() {
4137 return fetchNextPage (CompanyCollection .class );
4238 }
4339
44- public boolean hasNext () {
45- return iterator .hasNext ();
46- }
47-
48- public Company next () {
49- return iterator .next ();
50- }
51-
52- public void remove () {
53- iterator .remove ();
54- }
55-
5640 @ Override
5741 public String toString () {
5842 return "CompanyCollection{" +
Original file line number Diff line number Diff line change 88
99@ SuppressWarnings ("UnusedDeclaration" )
1010@ JsonIgnoreProperties (ignoreUnknown = true )
11- public class ContactCollection extends TypedDataCollection <Contact > implements Iterator < Contact > {
11+ public class ContactCollection extends TypedDataCollection <Contact > {
1212
13- protected TypedDataCollectionIterator <Contact > iterator ;
1413
1514 public ContactCollection () {
16- iterator = new TypedDataCollectionIterator <Contact >(this );
1715 }
1816
1917 public ContactCollection (List <Contact > contacts ) {
@@ -32,17 +30,4 @@ public List<Contact> getPage() {
3230 public ContactCollection nextPage () {
3331 return fetchNextPage (ContactCollection .class );
3432 }
35-
36- public boolean hasNext () {
37- return iterator .hasNext ();
38- }
39-
40- public Contact next () {
41- return iterator .next ();
42- }
43-
44- public void remove () {
45- iterator .remove ();
46- }
47-
4833}
Original file line number Diff line number Diff line change 88
99@ SuppressWarnings ("UnusedDeclaration" )
1010@ JsonIgnoreProperties (ignoreUnknown = true )
11- public class ConversationCollection extends TypedDataCollection <Conversation > implements Iterator < Conversation > {
11+ public class ConversationCollection extends TypedDataCollection <Conversation > {
1212
13- protected TypedDataCollectionIterator <Conversation > iterator ;
1413
1514 public ConversationCollection () {
1615 type = "conversation.list" ;
17- iterator = new TypedDataCollectionIterator <Conversation >(this );
1816 }
1917
2018 @ SuppressWarnings ("EmptyMethod" )
@@ -27,18 +25,4 @@ public List<Conversation> getPage() {
2725 public ConversationCollection nextPage () {
2826 return fetchNextPage (ConversationCollection .class );
2927 }
30-
31-
32- public boolean hasNext () {
33- return iterator .hasNext ();
34- }
35-
36- public Conversation next () {
37- return iterator .next ();
38- }
39-
40- public void remove () {
41- iterator .remove ();
42- }
43-
4428}
Original file line number Diff line number Diff line change 88
99@ SuppressWarnings ("UnusedDeclaration" )
1010@ JsonIgnoreProperties (ignoreUnknown = true )
11- public class EventCollection extends TypedDataCollection <Event > implements Iterator <Event > {
12- protected TypedDataCollectionIterator <Event > iterator ;
11+ public class EventCollection extends TypedDataCollection <Event > {
1312
1413 public EventCollection () {
15- iterator = new TypedDataCollectionIterator <Event >(this );
1614 }
1715
1816 public EventCollection (List <Event > events ) {
@@ -31,16 +29,4 @@ public List<Event> getPage() {
3129 public EventCollection nextPage () {
3230 return fetchNextPage (EventCollection .class );
3331 }
34-
35- public boolean hasNext () {
36- return iterator .hasNext ();
37- }
38-
39- public Event next () {
40- return iterator .next ();
41- }
42-
43- public void remove () {
44- iterator .remove ();
45- }
4632}
Original file line number Diff line number Diff line change 33import com .fasterxml .jackson .annotation .JsonIgnoreProperties ;
44import com .fasterxml .jackson .annotation .JsonProperty ;
55
6- import java .util .Iterator ;
76import java .util .List ;
87
98@ SuppressWarnings ("UnusedDeclaration" )
109@ JsonIgnoreProperties (ignoreUnknown = true )
11- public class JobItemCollection <T extends TypedData >
12- extends TypedDataCollection <JobItem <T >>
13- implements Iterator <JobItem <T >> {
14-
15- protected TypedDataCollectionIterator <JobItem <T >> iterator ;
10+ public class JobItemCollection <T extends TypedData > extends TypedDataCollection <JobItem <T >> {
1611
1712 public JobItemCollection () {
18- iterator = new TypedDataCollectionIterator <JobItem <T >>(this );
1913 }
2014
2115 public JobItemCollection (List <JobItem <T >> items ) {
@@ -34,17 +28,4 @@ public List<JobItem<T>> getPage() {
3428 public JobItemCollection <T > nextPage () {
3529 return fetchNextPage (JobItemCollection .class );
3630 }
37-
38- public boolean hasNext () {
39- return iterator .hasNext ();
40- }
41-
42- public JobItem <T > next () {
43- return iterator .next ();
44- }
45-
46- public void remove () {
47- iterator .remove ();
48- }
49-
5031}
Original file line number Diff line number Diff line change 33import com .fasterxml .jackson .annotation .JsonIgnoreProperties ;
44import com .fasterxml .jackson .annotation .JsonProperty ;
55
6- import java .util .Iterator ;
76import java .util .List ;
87
98@ SuppressWarnings ("UnusedDeclaration" )
109@ JsonIgnoreProperties (ignoreUnknown = true )
11- public class NoteCollection extends TypedDataCollection <Note > implements Iterator < Note > {
10+ public class NoteCollection extends TypedDataCollection <Note > {
1211
13- protected TypedDataCollectionIterator <Note > iterator ;
1412
1513 public NoteCollection () {
16- iterator = new TypedDataCollectionIterator <Note >(this );
1714 }
1815
1916 @ Override
@@ -27,17 +24,4 @@ public NoteCollection nextPage() {
2724 public List <Note > getPage () {
2825 return super .getPage ();
2926 }
30-
31- public boolean hasNext () {
32- return iterator .hasNext ();
33- }
34-
35- public Note next () {
36- return iterator .next ();
37- }
38-
39- public void remove () {
40- iterator .remove ();
41- }
42-
4327}
Original file line number Diff line number Diff line change 33import com .fasterxml .jackson .annotation .JsonIgnoreProperties ;
44import com .fasterxml .jackson .annotation .JsonProperty ;
55
6- import java .util .Iterator ;
76import java .util .List ;
87
98@ SuppressWarnings ("UnusedDeclaration" )
109@ JsonIgnoreProperties (ignoreUnknown = true )
11- public class NotificationCollection extends TypedDataCollection <Notification > implements Iterator < Notification > {
10+ public class NotificationCollection extends TypedDataCollection <Notification > {
1211
13- protected TypedDataCollectionIterator <Notification > iterator ;
1412
1513 public NotificationCollection () {
1614 type = "notification.list" ;
17- iterator = new TypedDataCollectionIterator <Notification >(this );
1815 }
1916
2017 @ Override
@@ -28,17 +25,4 @@ public NotificationCollection nextPage() {
2825 public List <Notification > getPage () {
2926 return super .getPage ();
3027 }
31-
32- public boolean hasNext () {
33- return iterator .hasNext ();
34- }
35-
36- public Notification next () {
37- return iterator .next ();
38- }
39-
40- public void remove () {
41- iterator .remove ();
42- }
43-
4428}
Original file line number Diff line number Diff line change 33import com .fasterxml .jackson .annotation .JsonIgnoreProperties ;
44import com .fasterxml .jackson .annotation .JsonProperty ;
55
6- import java .util .Iterator ;
76import java .util .List ;
87
98@ SuppressWarnings ("UnusedDeclaration" )
109@ JsonIgnoreProperties (ignoreUnknown = true )
11- public class NotificationErrorCollection extends TypedDataCollection <NotificationError > implements Iterator <NotificationError > {
12-
13- protected TypedDataCollectionIterator <NotificationError > iterator ;
10+ public class NotificationErrorCollection extends TypedDataCollection <NotificationError > {
1411
1512 public NotificationErrorCollection () {
1613 type = "notification.list" ;
17- iterator = new TypedDataCollectionIterator <NotificationError >(this );
1814 }
1915
2016 @ SuppressWarnings ("EmptyMethod" )
@@ -28,16 +24,4 @@ public List<NotificationError> getPage() {
2824 public NotificationErrorCollection nextPage () {
2925 return fetchNextPage (NotificationErrorCollection .class );
3026 }
31-
32- public boolean hasNext () {
33- return iterator .hasNext ();
34- }
35-
36- public NotificationError next () {
37- return iterator .next ();
38- }
39-
40- public void remove () {
41- iterator .remove ();
42- }
4327}
Original file line number Diff line number Diff line change 44import com .fasterxml .jackson .annotation .JsonInclude ;
55import com .fasterxml .jackson .annotation .JsonProperty ;
66
7- import java .util .Iterator ;
87import java .util .List ;
98
109@ SuppressWarnings ("UnusedDeclaration" )
1110@ JsonIgnoreProperties (ignoreUnknown = true )
1211@ JsonInclude (JsonInclude .Include .NON_EMPTY )
13- public class SegmentCollection extends TypedDataCollection <Segment > implements Iterator <Segment > {
14-
15- protected TypedDataCollectionIterator <Segment > iterator ;
12+ public class SegmentCollection extends TypedDataCollection <Segment > {
1613
1714 public SegmentCollection () {
1815 type = "segment.list" ;
19- iterator = new TypedDataCollectionIterator <Segment >(this );
2016 }
2117
2218 @ Override
@@ -31,21 +27,9 @@ public List<Segment> getPage() {
3127 return super .getPage ();
3228 }
3329
34- public boolean hasNext () {
35- return iterator .hasNext ();
36- }
37-
38- public Segment next () {
39- return iterator .next ();
40- }
41-
42- public void remove () {
43- iterator .remove ();
44- }
45-
4630 @ Override
4731 public String toString () {
4832 return "SegmentCollection{" +
49- "} " + super .toString ();
33+ "} " + super .toString ();
5034 }
5135}
You can’t perform that action at this time.
0 commit comments