7 public class VideoInfo {
9 private final String videoTitle;
10 private final String threadId;
11 private final String videoUrl;
12 private final String msgUrl;
13 private final String userId;
14 private final int videoLength;
15 private final OfficialOption officialOption;
25 * @param officialOption nullも可.
27 public VideoInfo(String videoTitle, String threadId, String videoUrl, String msgUrl, String userId, int videoLength,
28 OfficialOption officialOption) {
29 if (videoTitle == null || threadId == null || videoUrl == null || msgUrl == null || userId == null) {
30 throw new IllegalArgumentException("video informationの情報が不正です。");
32 this.videoTitle = videoTitle;
33 this.threadId = threadId;
34 this.videoUrl = videoUrl;
37 this.videoLength = videoLength;
38 this.officialOption = officialOption;
41 public String getMsgUrl() {
45 public String getThreadId() {
49 public String getUserId() {
53 public int getVideoLength() {
57 public String getVideoTitle() {
61 public String getVideoUrl() {
65 public OfficialOption getOfficialOption() {
66 return officialOption;
69 public int getBackCommentFromLength() {
70 final int length = getVideoLength();
74 } else if (length < 300) {
76 } else if (length < 600) {
83 public static class OfficialOption {
85 private final String threadKey;
86 private final String force184;
88 public OfficialOption(String threadKey, String force184) {
89 // if (threadKey == null || force184 == null) {
90 // throw new IllegalArgumentException("公式動画用キーが不正です");
92 this.threadKey = threadKey;
93 this.force184 = force184;
96 public String getThreadKey() {
100 public String getForce184() {