Enum Class TokenType

java.lang.Object
java.lang.Enum<TokenType>
com.hedera.hashgraph.sdk.TokenType
All Implemented Interfaces:
Serializable, Comparable<TokenType>, Constable

public enum TokenType extends Enum<TokenType>
Possible Token Types (IWA Compatibility).

Apart from fungible and non-fungible, Tokens can have either a common or unique representation. This distinction might seem subtle, but it is important when considering how tokens can be traced and if they can have isolated and unique properties.

See Hedera Documentation

  • Enum Constant Details

    • FUNGIBLE_COMMON

      public static final TokenType FUNGIBLE_COMMON
      Interchangeable value with one another, where any quantity of them has the same value as another equal quantity if they are in the same class. Share a single set of properties, not distinct from one another. Simply represented as a balance or quantity to a given Hedera account.
    • NON_FUNGIBLE_UNIQUE

      public static final TokenType NON_FUNGIBLE_UNIQUE
      Unique, not interchangeable with other tokens of the same type as they typically have different values. Individually traced and can carry unique properties (e.g. serial number).
  • Field Details

  • Method Details

    • values

      public static TokenType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TokenType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • valueOf

      static TokenType valueOf(TokenType code)
      What type are we.
      Parameters:
      code - the token type in question
      Returns:
      the token type
    • toString

      public String toString()
      Overrides:
      toString in class Enum<TokenType>
    • toProtobuf

      public TokenType toProtobuf()