Package org.polkadot.types.codec
Class Set
- java.lang.Object
-
- org.polkadot.types.codec.Base<java.util.List<java.lang.String>>
-
- org.polkadot.types.codec.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 classSet.SetValues
-
Constructor Summary
Constructors Constructor Description Set(Set.SetValues setValues, java.lang.Object value)
-
Method Summary
Modifier and Type Method Description booleaneq(java.lang.Object other)Compares the value of the input to see if there is a matchintgetEncodedLength()The length of the value when encoded as a Uint8ArraybooleanisEmpty()true is the Set contains no valuesjava.lang.StringtoHex()Returns a hex string representation of the valuejava.lang.ObjecttoJson()Converts the Object to JSON, typically used for RPC transfersjava.lang.StringtoString()Returns the string representation of the valuebyte[]toU8a(boolean isBare)longvalueEncoded()The encoded value for the set membersjava.util.List<java.lang.String>values()The actual set values as a Array
-
-
-
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:
getEncodedLengthin interfaceCodec
-
isEmpty
public boolean isEmpty()
true is the Set contains no values
-
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
-
toHex
public java.lang.String toHex()
Returns a hex string representation of the value
-
toJson
public java.lang.Object toJson()
Converts the Object to JSON, typically used for RPC transfers
-
toString
public java.lang.String toString()
Returns the string representation of the value- Overrides:
toStringin classjava.lang.Object
-
-