-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update 2.0: Added all actions to cover recent updates in the api
Documentation and nullity annotations are to follow
- Loading branch information
Showing
13 changed files
with
639 additions
and
719 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
49 changes: 49 additions & 0 deletions
49
src/main/java/me/robertlit/spigotresources/api/Category.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,49 @@ | ||
package me.robertlit.spigotresources.api; | ||
|
||
import java.util.Objects; | ||
|
||
public class Category { | ||
|
||
private final int id; | ||
private final String title, description; | ||
|
||
private Category(int id, String title, String description) { | ||
this.id = id; | ||
this.title = title; | ||
this.description = description; | ||
} | ||
|
||
public int getId() { | ||
return id; | ||
} | ||
|
||
public String getTitle() { | ||
return title; | ||
} | ||
|
||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
Category category = (Category) o; | ||
return id == category.id && title.equals(category.title) && description.equals(category.description); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(id, title, description); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Category{" + | ||
"id=" + id + | ||
", title='" + title + '\'' + | ||
", description='" + description + '\'' + | ||
'}'; | ||
} | ||
} |
Oops, something went wrong.