Class EmptyObject<T>
java.lang.Object
org.spongepowered.api.util.weighted.TableEntry<T>
org.spongepowered.api.util.weighted.EmptyObject<T>
- Type Parameters:
T- The type of object of this entries table
- All Implemented Interfaces:
DataSerializable
Represents an entry in a table which has no associated object. Used to have
rolls which give nothing.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGets the content version of thisDataSerializable.booleaninthashCode()Serializes this object into a comprehensibleDataContainer.toString()Methods inherited from class org.spongepowered.api.util.weighted.TableEntry
weight
-
Constructor Details
-
EmptyObject
public EmptyObject(double weight) Creates a newEmptyObjectwith the given weight.- Parameters:
weight- The weight of this object
-
-
Method Details
-
contentVersion
public int contentVersion()Description copied from interface:DataSerializableGets the content version of thisDataSerializable. The version may differ between instances of plugins and implementations such that theDataViewfromDataSerializable.toContainer()may include different information, or remove other information as they are no longer deemed necessary. The version goes hand in hand withDataContentUpdateras it is required when there exists anyDataViewof thisDataSerializablewith an "older" version.- Specified by:
contentVersionin interfaceDataSerializable- Returns:
- The version of the content being serialized
-
toContainer
Description copied from interface:DataSerializableSerializes this object into a comprehensibleDataContainer.- Specified by:
toContainerin interfaceDataSerializable- Returns:
- A newly created DataContainer
-
equals
-
hashCode
public int hashCode() -
toString
-