Package org.polkadot.types.type
Class AccountIndex
- java.lang.Object
-
- java.lang.Number
-
- java.math.BigInteger
-
- org.polkadot.types.codec.AbstractInt
-
- org.polkadot.types.codec.UInt
-
- org.polkadot.types.primitive.U32
-
- org.polkadot.types.type.AccountIndex
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<java.math.BigInteger>,Codec,Compactable
public class AccountIndex extends U32
A wrapper around an AccountIndex, which is a shortened, variable-length encoding for an Account. We extends fromU32to provide the number-like properties.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.math.BigIntegerENUMSET_SIZEstatic java.math.BigIntegerMAX_1BYTEstatic java.math.BigIntegerMAX_2BYTEstatic java.math.BigIntegerMAX_4BYTEstatic bytePREFIX_1BYTEstatic bytePREFIX_2BYTEstatic bytePREFIX_4BYTEstatic bytePREFIX_8BYTE
-
Constructor Summary
Constructors Constructor Description AccountIndex(java.lang.Object value)
-
Method Summary
-
Methods inherited from class org.polkadot.types.codec.AbstractInt
bitLength, getEncodedLength, isEmpty, toBn
-
Methods inherited from class java.math.BigInteger
abs, add, and, andNot, bitCount, byteValueExact, clearBit, compareTo, divide, divideAndRemainder, doubleValue, equals, flipBit, floatValue, gcd, getLowestSetBit, hashCode, intValue, intValueExact, isProbablePrime, longValue, longValueExact, max, min, mod, modInverse, modPow, multiply, negate, nextProbablePrime, not, or, pow, probablePrime, remainder, setBit, shiftLeft, shiftRight, shortValueExact, signum, sqrt, sqrtAndRemainder, subtract, testBit, toByteArray, toString, valueOf, xor
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.polkadot.types.Codec
getEncodedLength, isEmpty, toU8a
-
Methods inherited from interface org.polkadot.types.codec.Compactable
bitLength, toBn
-
-
-
-
Field Detail
-
ENUMSET_SIZE
public static final java.math.BigInteger ENUMSET_SIZE
-
PREFIX_1BYTE
public static final byte PREFIX_1BYTE
-
PREFIX_2BYTE
public static final byte PREFIX_2BYTE
-
PREFIX_4BYTE
public static final byte PREFIX_4BYTE
-
PREFIX_8BYTE
public static final byte PREFIX_8BYTE
-
MAX_1BYTE
public static final java.math.BigInteger MAX_1BYTE
-
MAX_2BYTE
public static final java.math.BigInteger MAX_2BYTE
-
MAX_4BYTE
public static final java.math.BigInteger MAX_4BYTE
-
-
Method Detail
-
eq
public boolean eq(java.lang.Object other)
Compares the value of the input to see if there is a match- Specified by:
eqin interfaceCodec- Overrides:
eqin classAbstractInt
-
toJson
public java.lang.Object toJson()
Converts the Object to JSON, typically used for RPC transfers- Specified by:
toJsonin interfaceCodec- Overrides:
toJsonin classAbstractInt
-
toString
public java.lang.String toString()
Returns the string representation of the value- Overrides:
toStringin classjava.math.BigInteger
-
-