Class StandardTokenFactory
java.lang.Object
com.minecolonies.api.colony.requestsystem.token.AbstractTokenFactory<UUID>
com.minecolonies.api.colony.requestsystem.token.StandardTokenFactory
- All Implemented Interfaces:
IFactory<UUID,,StandardToken> ITokenFactory<UUID,StandardToken>
Factory for the standard request token,
StandardToken-
Field Summary
Fields inherited from class com.minecolonies.api.colony.requestsystem.token.AbstractTokenFactory
NBT_LSB, NBT_MSB -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull com.google.common.reflect.TypeToken<UUID> Used to determine which type this can produce.@NotNull StandardTokengetNewInstance(@NotNull UUID input) Method to get a new instance of a token given the input and token.shortGet a serialization id for the factory.Methods inherited from class com.minecolonies.api.colony.requestsystem.token.AbstractTokenFactory
deserialize, deserialize, getFactoryOutputType, serialize, serializeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.minecolonies.api.colony.requestsystem.token.ITokenFactory
getNewInstance
-
Constructor Details
-
StandardTokenFactory
public StandardTokenFactory()
-
-
Method Details
-
getFactoryInputType
Description copied from interface:IFactoryUsed to determine which type this can produce.- Returns:
- The class that represents the Type of Request this can produce.
-
getNewInstance
Method to get a new instance of a token given the input and token.- Parameters:
input- The input to build a new token for.- Returns:
- The new output instance for a given input.
-
getSerializationId
public short getSerializationId()Description copied from interface:IFactoryGet a serialization id for the factory.- Returns:
- the short id.
-