public class ShowdownConverter extends java.lang.Object implements PokemonConverterProxy
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ABILITY_TEXT |
static java.lang.String |
CLONES_TEXT |
static java.lang.String |
EV_TEXT |
static char |
FEMALE_SYMBOL |
static java.lang.String |
GENDER_TEXT |
static java.lang.String |
GROWTH_TEXT |
static java.lang.String |
HAPPINESS_TEXT |
static java.lang.String |
IV_TEXT |
static java.lang.String |
LEVEL_TEXT |
static char |
MALE_SYMBOL |
static java.lang.String |
MINIOR_CORE_TEXT |
static java.lang.String |
MOVE_TEXT |
static java.lang.String |
NATURE_TEXT |
static java.lang.String |
POKE_BALL_TEXT |
static java.lang.String |
RUBY_TEXT |
static java.lang.String |
SHINY_NO |
static java.lang.String |
SHINY_TEXT |
static java.lang.String |
SHINY_YES |
static java.lang.String |
SMELT_TEXT |
static java.lang.String |
SPECIES_TEXT |
static java.lang.String[] |
STAT_TEXT |
Constructor and Description |
---|
ShowdownConverter() |
Modifier and Type | Method and Description |
---|---|
static void |
addColonSeparated(java.lang.StringBuilder builder,
java.lang.String label,
java.lang.Object value)
Separates a label and a value by a colon, and inserts a newline afterwards.
|
java.lang.String |
getExportText(Pokemon data)
Gets exportable text for the Pokémon.
|
int |
getIntAfterColon(java.lang.String string)
Gets the part of a string that is after a colon, converted to an integer.
|
java.lang.String |
getStringAfterColon(java.lang.String string)
Gets the part of a string that is after a colon.
|
java.util.List<Pokemon> |
importText(java.lang.String... importText)
Imports formatted text to a Pokemon instance
|
Pokemon |
importText(java.lang.String importText)
Parses import text and saves it to the Pokémon.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getExportText, getExportText, getExportText, getFormattedExportedText, getFormattedExportedText, getFormattedExportedText, importText
public static final java.lang.String SPECIES_TEXT
public static final java.lang.String GENDER_TEXT
public static final java.lang.String ABILITY_TEXT
public static final java.lang.String LEVEL_TEXT
public static final java.lang.String SHINY_TEXT
public static final java.lang.String HAPPINESS_TEXT
public static final java.lang.String EV_TEXT
public static final java.lang.String NATURE_TEXT
public static final java.lang.String IV_TEXT
public static final java.lang.String POKE_BALL_TEXT
public static final java.lang.String GROWTH_TEXT
public static final java.lang.String CLONES_TEXT
public static final java.lang.String RUBY_TEXT
public static final java.lang.String MINIOR_CORE_TEXT
public static final java.lang.String SMELT_TEXT
public static final java.lang.String MOVE_TEXT
public static final java.lang.String[] STAT_TEXT
public static final char MALE_SYMBOL
public static final char FEMALE_SYMBOL
public static final java.lang.String SHINY_YES
public static final java.lang.String SHINY_NO
public java.lang.String getExportText(Pokemon data)
getExportText
in interface PokemonConverterProxy
data
- The data object to export from.public static void addColonSeparated(java.lang.StringBuilder builder, java.lang.String label, java.lang.Object value)
builder
- The string builder to add the colon-separated string to.label
- The label to put before the colon.value
- The value to put after the colon.public java.util.List<Pokemon> importText(java.lang.String... importText) throws PokemonImportException
PokemonConverterProxy
importText
in interface PokemonConverterProxy
importText
- The formatted textPokemonImportException
- thrown when there's an error with the given textpublic Pokemon importText(java.lang.String importText) throws ShowdownImportException
importText
in interface PokemonConverterProxy
importText
- The text to save to the Pokémon.ShowdownImportException
public int getIntAfterColon(java.lang.String string)
string
- The string to filter.public java.lang.String getStringAfterColon(java.lang.String string)
string
- The string to filter.