Enum Class AssetType

java.lang.Object
java.lang.Enum<AssetType>
org.stellar.sdk.xdr.AssetType
All Implemented Interfaces:
Serializable, Comparable<AssetType>, Constable

public enum AssetType extends Enum<AssetType>
AssetType's original definition in the XDR file is:
 enum AssetType
 {
     ASSET_TYPE_NATIVE = 0,
     ASSET_TYPE_CREDIT_ALPHANUM4 = 1,
     ASSET_TYPE_CREDIT_ALPHANUM12 = 2,
     ASSET_TYPE_POOL_SHARE = 3
 };
 
  • Enum Constant Details

    • ASSET_TYPE_NATIVE

      public static final AssetType ASSET_TYPE_NATIVE
    • ASSET_TYPE_CREDIT_ALPHANUM4

      public static final AssetType ASSET_TYPE_CREDIT_ALPHANUM4
    • ASSET_TYPE_CREDIT_ALPHANUM12

      public static final AssetType ASSET_TYPE_CREDIT_ALPHANUM12
    • ASSET_TYPE_POOL_SHARE

      public static final AssetType ASSET_TYPE_POOL_SHARE
  • Method Details

    • values

      public static AssetType[] 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 AssetType 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
    • getValue

      public int getValue()
    • decode

      public static AssetType decode(XdrDataInputStream stream) throws IOException
      Throws:
      IOException
    • encode

      public void encode(XdrDataOutputStream stream) throws IOException
      Throws:
      IOException
    • fromXdrBase64

      public static AssetType fromXdrBase64(String xdr) throws IOException
      Throws:
      IOException
    • fromXdrByteArray

      public static AssetType fromXdrByteArray(byte[] xdr) throws IOException
      Throws:
      IOException
    • toXdrBase64

      default String toXdrBase64() throws IOException
      Throws:
      IOException
    • toXdrByteArray

      default byte[] toXdrByteArray() throws IOException
      Throws:
      IOException