Enum Class VarpState
- All Implemented Interfaces:
Serializable, Comparable<VarpState>, Constable
What a varp read found out about the variable.
Varps are set lazily by the server, so a varp at its default usually has no client
entry at all. That is a different answer from "no such varp" and from "the read failed",
and a value alone cannot tell them apart: an object-typed varp legitimately reads
-1 whether it is set or defaulted.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe varp exists but the client holds no entry for it, so it is at its type default.The cache has no varp with this id.The client holds a value for the varp;VarpRead.value()is it.The read could not be made: not in game, still entering the world, an invalid id, or a timed-out read. -
Method Summary
Methods inherited from class Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
SET
The client holds a value for the varp;VarpRead.value()is it. -
DEFAULT_NOT_SET_CLIENTSIDE
The varp exists but the client holds no entry for it, so it is at its type default. The value reported is that default, which is exactly what the game itself reads.VarpRead.defaultVerified()says whether the default came from the cache definition or is the plain fallback0. -
NO_SUCH_VARP
The cache has no varp with this id. The value is-1. -
UNAVAILABLE
The read could not be made: not in game, still entering the world, an invalid id, or a timed-out read. Nothing is known about the varp. The value is-1, and code that tracks a value over time should keep its last known one.
-
-
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
-