Enum Class Transition
- All Implemented Interfaces:
Serializable
,Comparable<Transition>
,Constable
The different transitions that can happen to image (character sprites and backgrounds)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFades into or out of existence by a defined time (in MS)"Pops" or moves the sprite when creating, destroying, or replacing itIn place replace with no animationSlides into or out of frame (only for character sprites) depending on the position defined. -
Method Summary
Modifier and TypeMethodDescriptionConverts each element to its string version to be returned as a list of strings.static Transition
fromString
(String value) Maps JSON values"fade"|"slide"|"pop"|"replace"
to theirTransition
counterparts.toString()
static Transition
Returns the enum constant of this class with the specified name.static Transition[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FADE
Fades into or out of existence by a defined time (in MS) -
SLIDE
Slides into or out of frame (only for character sprites) depending on the position defined. -
POP
"Pops" or moves the sprite when creating, destroying, or replacing it -
REPLACE
In place replace with no animation
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
fromString
Maps JSON values"fade"|"slide"|"pop"|"replace"
to theirTransition
counterparts.- Parameters:
value
- - String value to be converted- Returns:
Transition
value corresponding to the input string
-
toString
Converts each enum value to their string versions
- Overrides:
toString
in classEnum<Transition>
- Returns:
- The string version of each enum
-
displayNames
Converts each element to its string version to be returned as a list of strings.- Returns:
- A list of strings containing the string values for each enum element
-