Package cn.nukkit.metadata
Class FixedMetadataValue
java.lang.Object
cn.nukkit.metadata.MetadataValue
cn.nukkit.metadata.MetadataValueAdapter
cn.nukkit.metadata.LazyMetadataValue
cn.nukkit.metadata.FixedMetadataValue
A FixedMetadataValue is a special case metadata item that contains the same
value forever after initialization. Invalidating a FixedMetadataValue has
no effect.
This class extends LazyMetadataValue for historical reasons, even though it overrides all the implementation methods. it is possible that in the future that the inheritance hierarchy may change.
-
Nested Class Summary
Nested classes/interfaces inherited from class cn.nukkit.metadata.LazyMetadataValue
LazyMetadataValue.CacheStrategy
-
Field Summary
Fields inherited from class cn.nukkit.metadata.MetadataValue
owningPlugin
-
Constructor Summary
ConstructorsConstructorDescriptionFixedMetadataValue
(Plugin owningPlugin, Object value) Initializes a FixedMetadataValue with an Object -
Method Summary
Methods inherited from class cn.nukkit.metadata.MetadataValueAdapter
asBoolean, asByte, asDouble, asFloat, asInt, asLong, asShort, asString, getOwningPlugin
-
Constructor Details
-
FixedMetadataValue
Initializes a FixedMetadataValue with an Object- Parameters:
owningPlugin
- thePlugin
that created this metadata valuevalue
- the value assigned to this metadata value
-
-
Method Details
-
invalidate
public void invalidate()- Overrides:
invalidate
in classLazyMetadataValue
-
value
- Overrides:
value
in classLazyMetadataValue
-