java.lang.Object
com.minecolonies.api.colony.requestsystem.token.StandardToken
All Implemented Interfaces:
IToken<UUID>

public class StandardToken extends Object implements IToken<UUID>
Internal implementation of the IToken interface. Uses UUID to store the ID of the request.
  • Constructor Details

    • StandardToken

      public StandardToken()
      Creates a new token with a random id.
    • StandardToken

      public StandardToken(@NotNull @NotNull UUID id)
      Creates a new token with the given id.
      Parameters:
      id - the UUID to create it from.
  • Method Details

    • getIdentifier

      public UUID getIdentifier()
      The identifier used to represent a request.
      Specified by:
      getIdentifier in interface IToken<UUID>
      Returns:
      The identifier of the request that this token represents.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object