All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.neow3j.protocol.core.HexParameterNumber Maven / Gradle / Ivy

There is a newer version: 3.23.0
Show newest version
package io.neow3j.protocol.core;

import com.fasterxml.jackson.annotation.JsonValue;
import io.neow3j.utils.Numeric;

import java.math.BigInteger;

/**
 * Represents a parameter as a number.
 * This class converts to string hexadecimal.
 */
public class HexParameterNumber implements HexParameter {

    private BigInteger param;

    public HexParameterNumber(BigInteger paramAsBigInteger) {
        this.param = paramAsBigInteger;
    }

    @Override
    @JsonValue
    public String getHexValue() {
        return Numeric.toHexStringNoPrefix(this.param);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy