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

io.api.etherscan.model.TxInternal Maven / Gradle / Ivy

There is a newer version: 2.1.0
Show newest version
package io.api.etherscan.model;

/**
 * ! NO DESCRIPTION !
 *
 * @author GoodforGod
 * @since 29.10.2018
 */
public class TxInternal extends BaseTx {

    private String type;
    private long traceId;
    private int isError;
    private String errCode;

    //
    public String getType() {
        return type;
    }

    public long getTraceId() {
        return traceId;
    }

    public boolean haveError() {
        return isError == 1;
    }

    public String getErrCode() {
        return errCode;
    }
    //

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;

        TxInternal that = (TxInternal) o;

        if (traceId != that.traceId) return false;
        if (isError != that.isError) return false;
        if (type != null ? !type.equals(that.type) : that.type != null) return false;
        return errCode != null ? errCode.equals(that.errCode) : that.errCode == null;
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (int) (traceId ^ (traceId >>> 32));
        result = 31 * result + isError;
        result = 31 * result + (errCode != null ? errCode.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "TxInternal{" +
                "type='" + type + '\'' +
                ", traceId=" + traceId +
                ", isError=" + isError +
                ", errCode='" + errCode + '\'' +
                '}';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy