public class HealthUtils extends Object
Constructor and Description |
---|
HealthUtils() |
Modifier and Type | Method and Description |
---|---|
static <C extends Enum<C>> |
decode(String blueprint)
Produces an instance of health from a blueprint string previously generated via
the
encode(Health) method. |
static <C extends Enum<C>> |
encode(Health<C> health)
Takes a health instance and produces a string representation of that instance, which
can later be used to reconstitute an equivalent instance, via the
decode(String)
method. |
static String |
preserveClassCodecs() |
static void |
restoreClassCodecs(String memento)
Restore the codecs using the supplied memento string.
|
public static String preserveClassCodecs()
public static void restoreClassCodecs(String memento)
memento
- memento containing the encoding of the codecspublic static <C extends Enum<C>> String encode(Health<C> health)
decode(String)
method.health
- the instance to encodepublic static <C extends Enum<C>> Health<C> decode(String blueprint)
encode(Health)
method.blueprint
- the string representationNullPointerException
- if blueprint is nullIllegalArgumentException
- if blueprint cannot be decoded correctlyCopyright © 2016. All Rights Reserved.