Skip to content

Commit b6dfe0c

Browse files
sadyeGrover-c13
authored andcommitted
Deprecate pokemon.getFavorite, rename to pokemon.isFavorite (#230)
* deprecate getFavorite, rename to isFavorite * Adhere to checkstyle
1 parent 76fb2b5 commit b6dfe0c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/main/java/com/pokegoapi/api/pokemon/Pokemon.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,16 @@ public String getEggIncubatorId() {
336336
public long getCreationTimeMs() {
337337
return proto.getCreationTimeMs();
338338
}
339+
340+
/**
341+
* Checks whether the Pokémon is set as favorite.
342+
* @return true if the Pokémon is set as favorite
343+
*/
344+
public boolean isFavorite() {
345+
return proto.getFavorite() > 0;
346+
}
339347

348+
@Deprecated
340349
public boolean getFavorite() {
341350
return proto.getFavorite() > 0;
342351
}

0 commit comments

Comments
 (0)