Class AssetTypeNative

java.lang.Object
org.stellar.sdk.Asset
org.stellar.sdk.AssetTypeNative
All Implemented Interfaces:
Comparable<Asset>

public final class AssetTypeNative extends Asset
Represents Stellar native asset - Lumens (XLM)
See Also:
  • Constructor Details

    • AssetTypeNative

      public AssetTypeNative()
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getType

      public AssetType getType()
      Description copied from class: Asset
      Returns asset type.
      Specified by:
      getType in class Asset
    • equals

      public boolean equals(Object object)
      Specified by:
      equals in class Asset
    • hashCode

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

      public Asset toXdr()
      Description copied from class: Asset
      Generates XDR object from a given Asset object
      Specified by:
      toXdr in class Asset
    • compareTo

      public int compareTo(@NonNull @NonNull Asset other)
      Description copied from class: Asset
      Compares two assets.
      1. First compare the type (eg. native before alphanum4 before alphanum12).
      2. If the types are equal, compare the assets codes.
      3. If the asset codes are equal, compare the issuers.
      Specified by:
      compareTo in interface Comparable<Asset>
      Specified by:
      compareTo in class Asset
      Parameters:
      other - the object to be compared.
      Returns:
      a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.