blob: 6fd72b87dc298624db83808150fd70febe09e824 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
package files;
public class Anime {
private final String name;
private final String description;
private final String[] genres;
private final String year;
private final String image;
private static byte indexOfRecentlyAddedAnime = 0;
public Anime(String name, String description, String[] genres, String year, String image) {
this.name = name;
this.description = description;
this.genres = genres;
this.year = year;
this.image = image;
}
public String showInfo() {
return "Имя: " + this.name + System.lineSeparator() +
"Описание: " + this.description + System.lineSeparator() +
"Год: " + this.year + System.lineSeparator();
}
public String getImage() {
return image;
}
public static byte getIndexOfRecentlyAddedAnime() {
return indexOfRecentlyAddedAnime;
}
public static void setIndexOfRecentlyAddedAnime(byte number) {
indexOfRecentlyAddedAnime = number;
}
public static void decreaseIndexOfRecentlyAddedAnime() {
indexOfRecentlyAddedAnime--;
}
public static void increaseIndexOfRecentlyAddedAnime() {
indexOfRecentlyAddedAnime++;
}
}
|