public final class Bestiary
extends java.lang.Object
| Constructor and Description |
|---|
Bestiary(Client client)
Creates a new
Bestiary. |
| Modifier and Type | Method and Description |
|---|---|
ImmutableList<java.lang.String> |
areaNames()
Gets an
ImmutableList of area names. |
java.util.Optional<Beast> |
beastData(int beastId)
Gets the a
Beast by its id. |
ImmutableMap<java.lang.Integer,java.lang.String> |
beastsInArea(java.lang.String area)
Searches for the
Beasts in a given area. |
ImmutableMap<java.lang.Integer,java.lang.String> |
beastsInLevelGroup(int lowerBound,
int upperBound)
Searches for the
Beasts that have a combat level between the lower and upper bound inclusively. |
ImmutableMap<java.lang.Integer,java.lang.String> |
beastsInSlayerCategory(int categoryId)
Searches for the
Beasts in a given Slayer category. |
ImmutableMap<java.lang.Integer,java.lang.String> |
beastsInSlayerCategory(java.lang.String categoryName)
Searches for the
Beasts in a given Slayer category. |
ImmutableMap<java.lang.Integer,java.lang.String> |
beastsWeakTo(int weaknessId)
Searches for the
Beasts that are weak to a specific weakness. |
ImmutableMap<java.lang.Integer,java.lang.String> |
beastsWeakTo(java.lang.String weaknessName)
Searches for the
Beasts that are weak to a specific weakness. |
Search |
search()
|
ImmutableMap<java.lang.Integer,java.lang.String> |
searchByFirstLetter(char letter)
Searches for a
Beast by the first letter in it's name. |
ImmutableMap<java.lang.Integer,java.lang.String> |
searchByTerms(java.lang.String... terms)
Searches for a
Beast's id by a set of terms. |
ImmutableMap<java.lang.String,java.lang.Integer> |
slayerCategories()
Gets an
ImmutableMap of Slayer category names to their corresponding ids. |
ImmutableMap<java.lang.String,java.lang.Integer> |
weaknesses()
Gets an
ImmutableMap of weakness category names to their corresponding ids. |
public java.util.Optional<Beast> beastData(int beastId) throws java.io.IOException
Beast by its id.beastId - The id of the Beast.Optional containing the Beast, or Optional.empty() if no Beast of that id was found.java.io.IOException - If an I/O error occurs.public ImmutableMap<java.lang.Integer,java.lang.String> searchByTerms(java.lang.String... terms) throws java.io.IOException
Beast's id by a set of terms.terms - The terms to search by.ImmutableMap of Beast ids to Beast names.java.io.IOException - If an I/O error occurs.public ImmutableMap<java.lang.Integer,java.lang.String> searchByFirstLetter(char letter) throws java.io.IOException
Beast by the first letter in it's name.letter - The letter to search by.ImmutableMap of Beast ids to Beast names.java.io.IOException - If an I/O error occurs.public ImmutableList<java.lang.String> areaNames() throws java.io.IOException
ImmutableList of area names.ImmutableList of area names.java.io.IOException - If an I/O error occurs.public ImmutableMap<java.lang.Integer,java.lang.String> beastsInArea(java.lang.String area) throws java.io.IOException
Beasts in a given area.area - The name of the area to search for.ImmutableMap of Beast ids to Beast names.java.io.IOException - If an I/O error occurs.public ImmutableMap<java.lang.String,java.lang.Integer> slayerCategories() throws java.io.IOException
ImmutableMap of Slayer category names to their corresponding ids.ImmutableMap of Slayer category names to their corresponding ids.java.io.IOException - If an I/O error occurs.public ImmutableMap<java.lang.Integer,java.lang.String> beastsInSlayerCategory(int categoryId) throws java.io.IOException
Beasts in a given Slayer category.categoryId - The id of the Slayer category.ImmutableMap of Beast ids to Beast names.java.io.IOException - If an I/O error occurs.public ImmutableMap<java.lang.Integer,java.lang.String> beastsInSlayerCategory(java.lang.String categoryName) throws java.io.IOException
Beasts in a given Slayer category.categoryName - The name of the Slayer category.ImmutableMap of Beast ids to Beast names.java.io.IOException - If an I/O error occurs.public ImmutableMap<java.lang.String,java.lang.Integer> weaknesses() throws java.io.IOException
ImmutableMap of weakness category names to their corresponding ids.ImmutableMap of weakness category names to their corresponding ids.java.io.IOException - If an I/O error occurs.public ImmutableMap<java.lang.Integer,java.lang.String> beastsWeakTo(int weaknessId) throws java.io.IOException
Beasts that are weak to a specific weakness.weaknessId - The id of the weakness.ImmutableMap of Beast ids to Beast names.java.io.IOException - If an I/O error occurs.public ImmutableMap<java.lang.Integer,java.lang.String> beastsWeakTo(java.lang.String weaknessName) throws java.io.IOException
Beasts that are weak to a specific weakness.weaknessName - The name of the weakness.ImmutableMap of Beast ids to Beast names.java.io.IOException - If an I/O error occurs.public ImmutableMap<java.lang.Integer,java.lang.String> beastsInLevelGroup(int lowerBound, int upperBound) throws java.io.IOException
Beasts that have a combat level between the lower and upper bound inclusively.lowerBound - The lowest combat level.upperBound - The highest combat level.ImmutableMap of Beast ids to Beast names.java.io.IOException - If an I/O error occurs.