package com.mavlonerkinboev.animarfo.anime;
public class Anime {
private final String name;
private final String description;
private final String genres;
private final String year;
private String series;
private final String rating;
public final String image;
private final String url;
public static String dub;
public static String type;
public static Anime[] list;
public static byte index = 0;
public static String searched;
public static byte size;
public static boolean isSearching;
public Anime(String name, String description, String genres, String year, String rating, String image, String url) {
this.name = name;
this.description = description;
this.genres = genres;
this.year = year;
this.rating = rating;
this.image = image;
this.url = url;
}
public Anime(String name, String description, String genres, String year, String series, String rating, String image, String url) {
this.name = name;
this.description = description;
this.genres = genres;
this.year = year;
this.series = series;
this.rating = rating;
this.image = image;
this.url = url;
}
public String showInfo() {
return getName() + getYear() + getGenres() + getSeries() + getRating() + getDub() + getDescription();
}
public String getName() {
return (name != null) ? ("Название: " + this.name + System.lineSeparator()) : "";
}
public String getYear() {
return (year != null) ? ("Год: " + this.year + System.lineSeparator()) : "";
}
public String getGenres() {
return (genres != null) ? ("Жанр: " + this.genres + System.lineSeparator()) : "";
}
public String getSeries() {
return (series != null) ? ("Серий: " + this.series + System.lineSeparator()) : "";
}
public String getRating() {
return (rating != null) ? ("Рейтинг: " + this.rating + System.lineSeparator()) : "";
}
public String getDub() {
return (dub != null) ? ("Озвучка: " + dub + System.lineSeparator()) : "";
}
public String getDescription() {
return (description != null) ? ("Описание: " + description + System.lineSeparator()) : "";
}
public String getImage() {
return image;
}
public String getUrl() {
return this.url;
}
public static void setIndex(byte index) {
Anime.index = index;
}
public static void decreaseIndexOfAnime() {
index--;
}
public static void increaseIndexOfAnime() {
index++;
}
public static void setSearched(String searched) {
Anime.searched = searched.replace(' ', '+');
}
public static void setList(Anime[] list) {
Anime.list = list;
}
}