Class RpcValue

  • All Implemented Interfaces:
    RpcItem

    public class RpcValue
    extends java.lang.Object
    implements RpcItem
    RpcValue contains a leaf value such as string, bytes, integer, boolean
    • Field Detail

      • NULL

        public static final RpcValue NULL
    • Constructor Detail

      • RpcValue

        public RpcValue​(RpcValue value)
      • RpcValue

        public RpcValue​(Address value)
      • RpcValue

        public RpcValue​(java.lang.String value)
      • RpcValue

        public RpcValue​(byte[] value)
      • RpcValue

        public RpcValue​(java.math.BigInteger value)
      • RpcValue

        public RpcValue​(boolean value)
      • RpcValue

        public RpcValue​(java.lang.Boolean value)
      • RpcValue

        public RpcValue​(Bytes value)
    • Method Detail

      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface RpcItem
      • isNull

        public boolean isNull()
        Specified by:
        isNull in interface RpcItem
      • asString

        public java.lang.String asString()
        Returns the value as string
        Specified by:
        asString in interface RpcItem
        Returns:
        the value as string
      • asByteArray

        public byte[] asByteArray()
        Returns the value as bytes
        Specified by:
        asByteArray in interface RpcItem
        Returns:
        the value as bytes
      • asInteger

        public java.math.BigInteger asInteger()
        Returns the value as integer
        Specified by:
        asInteger in interface RpcItem
        Returns:
        the value as integer
      • asBoolean

        public java.lang.Boolean asBoolean()
        Returns the value as boolean
        Specified by:
        asBoolean in interface RpcItem
        Returns:
        the value as boolean
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object