Class Set

  • All Implemented Interfaces:
    Codec
    Direct Known Subclasses:
    WithdrawReasons

    public class Set
    extends Base<java.util.List<java.lang.String>>
    implements Codec
    An Set is an array of string values, represented an an encoded type by a bitwise representation of the values.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Set.SetValues  
    • Field Summary

      • Fields inherited from class org.polkadot.types.codec.Base

        raw
    • Constructor Summary

      Constructors 
      Constructor Description
      Set​(Set.SetValues setValues, java.lang.Object value)  
    • Method Summary

      Modifier and Type Method Description
      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
      boolean isEmpty()
      true is the Set contains no values
      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()
      Returns the string representation of the value
      byte[] toU8a​(boolean isBare)  
      long valueEncoded()
      The encoded value for the set members
      java.util.List<java.lang.String> values()
      The actual set values as a Array
      • Methods inherited from class java.lang.Object

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

        toU8a
    • Constructor Detail

      • Set

        public Set​(Set.SetValues setValues,
                   java.lang.Object value)
    • Method Detail

      • getEncodedLength

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

        public boolean isEmpty()
        true is the Set contains no values
        Specified by:
        isEmpty in interface Codec
      • values

        public java.util.List<java.lang.String> values()
        The actual set values as a Array
      • valueEncoded

        public long valueEncoded()
        The encoded value for the set members
      • 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()
        Returns the string representation of the value
        Overrides:
        toString in class java.lang.Object
      • toU8a

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