Class Struct

    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      Struct​(Types.ConstructorDef constructorDef, java.lang.Object value)  
      Struct​(Types.ConstructorDef constructorDef, java.lang.Object value, java.util.Map<java.lang.String,​java.lang.String> json)  
    • Method Summary

      Modifier and Type Method Description
      static Types.ConstructorCodec<Struct> builder()  
      boolean eq​(java.lang.Object other)
      Compares the value of the input to see if there is a match
      int getEncodedLength()
      The length of the value when encoded as a Uint8Array
      <T> T getField​(java.lang.String key)  
      boolean isEmpty()
      Checks if the value is an empty value
      java.util.List<Codec> toArray()
      Converts the Object to an standard JavaScript Array
      java.lang.String toHex()
      Returns a hex string representation of the value
      java.lang.Object toJson()
      Converts the Object to JSON, typically used for RPC transfers
      java.lang.String toString()  
      byte[] toU8a​(boolean isBare)
      Encodes the value as a Uint8Array as per the parity-codec specifications
      static Types.ConstructorCodec<Struct> with​(Types.ConstructorDef types)  
      • Methods inherited from class java.util.LinkedHashMap

        clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
      • Methods inherited from class java.util.HashMap

        clone, compute, computeIfAbsent, computeIfPresent, containsKey, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
      • Methods inherited from class java.util.AbstractMap

        equals, hashCode
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.polkadot.types.Codec

        toU8a
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
    • Constructor Detail

      • Struct

        public Struct​(Types.ConstructorDef constructorDef,
                      java.lang.Object value,
                      java.util.Map<java.lang.String,​java.lang.String> json)
    • Method Detail

      • getEncodedLength

        public int getEncodedLength()
        The length of the value when encoded as a Uint8Array
        Specified by:
        getEncodedLength in interface Codec
      • toArray

        public java.util.List<Codec> toArray()
        Converts the Object to an standard JavaScript Array
      • eq

        public boolean eq​(java.lang.Object other)
        Compares the value of the input to see if there is a match
        Specified by:
        eq in interface Codec
      • toHex

        public java.lang.String toHex()
        Returns a hex string representation of the value
        Specified by:
        toHex in interface Codec
      • toJson

        public java.lang.Object toJson()
        Converts the Object to JSON, typically used for RPC transfers
        Specified by:
        toJson in interface Codec
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.util.AbstractMap<java.lang.String,​Codec>
      • toU8a

        public byte[] toU8a​(boolean isBare)
        Encodes the value as a Uint8Array as per the parity-codec specifications
        Specified by:
        toU8a in interface Codec
        Parameters:
        isBare - true when the value has none of the type-specific prefixes (internal)
      • getField

        public <T> T getField​(java.lang.String key)
      • isEmpty

        public boolean isEmpty()
        Checks if the value is an empty value
        Specified by:
        isEmpty in interface Codec
        Specified by:
        isEmpty in interface java.util.Map<java.lang.String,​Codec>
        Overrides:
        isEmpty in class java.util.HashMap<java.lang.String,​Codec>