T
- The entry typepublic class WeightedSerializableObject<T extends DataSerializable> extends WeightedObject<T> implements DataSerializable
Constructor and Description |
---|
WeightedSerializableObject(T object,
int weight)
Creates a new
WeightedSerializableObject with the provided
DataSerializable . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
getContentVersion()
Gets the content version of this
DataSerializable . |
DataContainer |
toContainer()
Serializes this object into a comprehensible
DataContainer . |
String |
toString() |
get, hashCode
getWeight
public WeightedSerializableObject(T object, int weight)
WeightedSerializableObject
with the provided
DataSerializable
.object
- The serializable objectweight
- The weightpublic String toString()
toString
in class WeightedObject<T extends DataSerializable>
public boolean equals(Object o)
equals
in class WeightedObject<T extends DataSerializable>
public int getContentVersion()
DataSerializable
DataSerializable
. The version
may differ between instances of plugins and implementations such that
the DataView
from DataSerializable.toContainer()
may include different
information, or remove other information as they are no longer deemed
necessary. The version goes hand in hand with DataContentUpdater
as it is required when there exists any DataView
of this
DataSerializable
with an "older" version.getContentVersion
in interface DataSerializable
public DataContainer toContainer()
DataSerializable
DataContainer
.toContainer
in interface DataSerializable