-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from dutwrapper/draft - Bumped to v1.8.3
Bumped to v1.8.3
- Loading branch information
Showing
11 changed files
with
348 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
src/main/java/io/dutwrapper/dutwrapper/model/news/NewsGlobalGroupByDate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package io.dutwrapper.dutwrapper.model.news; | ||
|
||
import java.util.ArrayList; | ||
|
||
public class NewsGlobalGroupByDate { | ||
ArrayList<NewsGlobalItem> data; | ||
long date; | ||
|
||
public NewsGlobalGroupByDate(long date) { | ||
this.date = date; | ||
this.data = new ArrayList<NewsGlobalItem>(); | ||
} | ||
|
||
public ArrayList<NewsGlobalItem> getData() { | ||
return data; | ||
} | ||
|
||
public long getDateInUnixTimeMilliseconds() { | ||
return date; | ||
} | ||
|
||
public void addData(NewsGlobalItem item) { | ||
if (item.getDate() != date) { | ||
return; | ||
} | ||
|
||
if (!(data.stream().anyMatch(p -> p.getDate() == item.getDate() && | ||
p.getTitle() == item.getTitle() && | ||
p.getContent() == item.getContent()))) { | ||
data.add(item); | ||
} | ||
} | ||
|
||
public void addData(ArrayList<NewsGlobalItem> itemList) { | ||
for (NewsGlobalItem item : itemList) { | ||
addData(item); | ||
} | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
src/main/java/io/dutwrapper/dutwrapper/model/news/NewsSubjectGroupByDate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package io.dutwrapper.dutwrapper.model.news; | ||
|
||
import java.util.ArrayList; | ||
|
||
public class NewsSubjectGroupByDate { | ||
ArrayList<NewsSubjectItem> data; | ||
long date; | ||
|
||
public NewsSubjectGroupByDate(long date) { | ||
this.date = date; | ||
this.data = new ArrayList<NewsSubjectItem>(); | ||
} | ||
|
||
public ArrayList<NewsSubjectItem> getData() { | ||
return data; | ||
} | ||
|
||
public long getDateInUnixTimeMilliseconds() { | ||
return date; | ||
} | ||
|
||
public void addData(NewsSubjectItem item) { | ||
if (item.getDate() != date) { | ||
return; | ||
} | ||
|
||
if (!(data.stream().anyMatch(p -> p.getDate() == item.getDate() && | ||
p.getTitle() == item.getTitle() && | ||
p.getContent() == item.getContent()))) { | ||
data.add(item); | ||
} | ||
} | ||
|
||
public void addData(ArrayList<NewsSubjectItem> itemList) { | ||
for (NewsSubjectItem item : itemList) { | ||
addData(item); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.