From 0151b6f2d82b7128cacd753c69e6908387f5174f Mon Sep 17 00:00:00 2001 From: FireMasterK <20838718+FireMasterK@users.noreply.github.com> Date: Mon, 14 Dec 2020 11:30:45 +0530 Subject: [PATCH] Remove getters. --- .../me/kavin/piped/utils/obj/Channel.java | 28 +------ .../me/kavin/piped/utils/obj/ChannelPage.java | 12 +-- .../me/kavin/piped/utils/obj/PipedStream.java | 18 +---- .../me/kavin/piped/utils/obj/StreamItem.java | 32 +------- .../me/kavin/piped/utils/obj/Streams.java | 80 ++----------------- .../me/kavin/piped/utils/obj/Subtitle.java | 10 +-- 6 files changed, 14 insertions(+), 166 deletions(-) diff --git a/src/main/java/me/kavin/piped/utils/obj/Channel.java b/src/main/java/me/kavin/piped/utils/obj/Channel.java index 3041bfb..d68af7f 100644 --- a/src/main/java/me/kavin/piped/utils/obj/Channel.java +++ b/src/main/java/me/kavin/piped/utils/obj/Channel.java @@ -4,8 +4,8 @@ import java.util.List; public class Channel { - private String name, avatarUrl, bannerUrl, description, nextpage; - private List relatedStreams; + public String name, avatarUrl, bannerUrl, description, nextpage; + public List relatedStreams; public Channel(String name, String avatarUrl, String bannerUrl, String description, String nextpage, List relatedStreams) { @@ -15,28 +15,4 @@ public class Channel { this.nextpage = nextpage; this.relatedStreams = relatedStreams; } - - public String getName() { - return name; - } - - public String getAvatarUrl() { - return avatarUrl; - } - - public String getBannerUrl() { - return bannerUrl; - } - - public String getDescription() { - return description; - } - - public String getNextpage() { - return nextpage; - } - - public List getRelatedStreams() { - return relatedStreams; - } } diff --git a/src/main/java/me/kavin/piped/utils/obj/ChannelPage.java b/src/main/java/me/kavin/piped/utils/obj/ChannelPage.java index 802ddb8..92eb295 100644 --- a/src/main/java/me/kavin/piped/utils/obj/ChannelPage.java +++ b/src/main/java/me/kavin/piped/utils/obj/ChannelPage.java @@ -4,19 +4,11 @@ import java.util.List; public class ChannelPage { - private String nextpage; - private List relatedStreams; + public String nextpage; + public List relatedStreams; public ChannelPage(String nextpage, List relatedStreams) { this.nextpage = nextpage; this.relatedStreams = relatedStreams; } - - public String getNextpage() { - return nextpage; - } - - public List getRelatedStreams() { - return relatedStreams; - } } diff --git a/src/main/java/me/kavin/piped/utils/obj/PipedStream.java b/src/main/java/me/kavin/piped/utils/obj/PipedStream.java index db5e05c..a0dfc44 100644 --- a/src/main/java/me/kavin/piped/utils/obj/PipedStream.java +++ b/src/main/java/me/kavin/piped/utils/obj/PipedStream.java @@ -2,7 +2,7 @@ package me.kavin.piped.utils.obj; public class PipedStream { - private String url, format, quality, mimeType; + public String url, format, quality, mimeType; public PipedStream(String url, String format, String quality, String mimeType) { this.url = url; @@ -10,20 +10,4 @@ public class PipedStream { this.quality = quality; this.mimeType = mimeType; } - - public String getUrl() { - return url; - } - - public String getFormat() { - return format; - } - - public String getQuality() { - return quality; - } - - public String getMimeType() { - return mimeType; - } } diff --git a/src/main/java/me/kavin/piped/utils/obj/StreamItem.java b/src/main/java/me/kavin/piped/utils/obj/StreamItem.java index 4501dc2..0fc0946 100644 --- a/src/main/java/me/kavin/piped/utils/obj/StreamItem.java +++ b/src/main/java/me/kavin/piped/utils/obj/StreamItem.java @@ -2,8 +2,8 @@ package me.kavin.piped.utils.obj; public class StreamItem { - private String url, title, thumbnail, uploaderName, uploaderUrl; - private long duration, views; + public String url, title, thumbnail, uploaderName, uploaderUrl; + public long duration, views; public StreamItem(String url, String title, String thumbnail, String uploaderName, String uploaderUrl, long duration, long views) { @@ -15,32 +15,4 @@ public class StreamItem { this.duration = duration; this.views = views; } - - public String getUrl() { - return url; - } - - public String getTitle() { - return title; - } - - public String getThumbnail() { - return thumbnail; - } - - public String getUploaderName() { - return uploaderName; - } - - public String getUploaderUrl() { - return uploaderUrl; - } - - public long getDuration() { - return duration; - } - - public long getViews() { - return views; - } } diff --git a/src/main/java/me/kavin/piped/utils/obj/Streams.java b/src/main/java/me/kavin/piped/utils/obj/Streams.java index ce14713..3f4555b 100644 --- a/src/main/java/me/kavin/piped/utils/obj/Streams.java +++ b/src/main/java/me/kavin/piped/utils/obj/Streams.java @@ -4,17 +4,17 @@ import java.util.List; public class Streams { - private String title, description, uploadDate, uploader, uploaderUrl, uploaderAvatar, thumbnailUrl, hls; + public String title, description, uploadDate, uploader, uploaderUrl, uploaderAvatar, thumbnailUrl, hls; - private long duration, views, likes, dislikes; + public long duration, views, likes, dislikes; - private List audioStreams, videoStreams; + public List audioStreams, videoStreams; - private List relatedStreams; + public List relatedStreams; - private List subtitles; + public List subtitles; - private boolean livestream; + public boolean livestream; public Streams(String title, String description, String uploadDate, String uploader, String uploaderUrl, String uploaderAvatar, String thumbnailUrl, long duration, long views, long likes, long dislikes, @@ -38,72 +38,4 @@ public class Streams { this.livestream = livestream; this.hls = hls; } - - public String getTitle() { - return title; - } - - public String getDescription() { - return description; - } - - public String getUploadDate() { - return uploadDate; - } - - public String getUploader() { - return uploader; - } - - public String getUploaderUrl() { - return uploaderUrl; - } - - public String getUploaderAvatar() { - return uploaderAvatar; - } - - public String getThumbnailUrl() { - return thumbnailUrl; - } - - public long getDuration() { - return duration; - } - - public long getViews() { - return views; - } - - public long getLikes() { - return likes; - } - - public long getDislikes() { - return dislikes; - } - - public List getAudioStreams() { - return audioStreams; - } - - public List getVideoStreams() { - return videoStreams; - } - - public List getRelatedStreams() { - return relatedStreams; - } - - public List getSubtitles() { - return subtitles; - } - - public boolean isLivestream() { - return livestream; - } - - public String getHls() { - return hls; - } } diff --git a/src/main/java/me/kavin/piped/utils/obj/Subtitle.java b/src/main/java/me/kavin/piped/utils/obj/Subtitle.java index 4ba9ff4..ed5f5ca 100644 --- a/src/main/java/me/kavin/piped/utils/obj/Subtitle.java +++ b/src/main/java/me/kavin/piped/utils/obj/Subtitle.java @@ -2,18 +2,10 @@ package me.kavin.piped.utils.obj; public class Subtitle { - private final String url, mimeType; + public final String url, mimeType; public Subtitle(String url, String mimeType) { this.url = url; this.mimeType = mimeType; }; - - public String getUrl() { - return url; - } - - public String getMimeType() { - return mimeType; - } }