mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 03:35:51 -07:00
Pulling all pending Bukkit-JavaDoc changes
By: Edmond Poon <sagaciouszzzz@gmail.com>
This commit is contained in:
@@ -7,7 +7,7 @@ import java.util.concurrent.Callable;
|
||||
/**
|
||||
* A FixedMetadataValue is a special case metadata item that contains the same value forever after initialization.
|
||||
* Invalidating a FixedMetadataValue has no effect.
|
||||
*
|
||||
* <p>
|
||||
* 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.
|
||||
*/
|
||||
|
@@ -13,48 +13,56 @@ public interface MetadataValue {
|
||||
|
||||
/**
|
||||
* Attempts to convert the value of this metadata item into an int.
|
||||
*
|
||||
* @return the value as an int.
|
||||
*/
|
||||
public int asInt();
|
||||
|
||||
/**
|
||||
* Attempts to convert the value of this metadata item into a float.
|
||||
*
|
||||
* @return the value as a float.
|
||||
*/
|
||||
public float asFloat();
|
||||
|
||||
/**
|
||||
* Attempts to convert the value of this metadata item into a double.
|
||||
*
|
||||
* @return the value as a double.
|
||||
*/
|
||||
public double asDouble();
|
||||
|
||||
/**
|
||||
* Attempts to convert the value of this metadata item into a long.
|
||||
*
|
||||
* @return the value as a long.
|
||||
*/
|
||||
public long asLong();
|
||||
|
||||
/**
|
||||
* Attempts to convert the value of this metadata item into a short.
|
||||
*
|
||||
* @return the value as a short.
|
||||
*/
|
||||
public short asShort();
|
||||
|
||||
/**
|
||||
* Attempts to convert the value of this metadata item into a byte.
|
||||
*
|
||||
* @return the value as a byte.
|
||||
*/
|
||||
public byte asByte();
|
||||
|
||||
/**
|
||||
* Attempts to convert the value of this metadata item into a boolean.
|
||||
*
|
||||
* @return the value as a boolean.
|
||||
*/
|
||||
public boolean asBoolean();
|
||||
|
||||
/**
|
||||
* Attempts to convert the value of this metadata item into a string.
|
||||
*
|
||||
* @return the value as a string.
|
||||
*/
|
||||
public String asString();
|
||||
|
@@ -8,11 +8,10 @@ import org.bukkit.util.NumberConversions;
|
||||
|
||||
/**
|
||||
* Optional base class for facilitating MetadataValue implementations.
|
||||
*
|
||||
* <p>
|
||||
* This provides all the conversion functions for MetadataValue
|
||||
* so that writing an implementation of MetadataValue is as simple
|
||||
* as implementing value() and invalidate().
|
||||
*
|
||||
*/
|
||||
public abstract class MetadataValueAdapter implements MetadataValue {
|
||||
protected final WeakReference<Plugin> owningPlugin;
|
||||
|
Reference in New Issue
Block a user