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

software.crldev.elrondspringbootstarterreactive.api.model.TokenList Maven / Gradle / Ivy

Go to download

A SpringBoot Starter solution designed to ensure easy and efficient integration with the Elrond Network using a Reactive API layer.

The newest version!
package software.crldev.elrondspringbootstarterreactive.api.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Set;

/**
 * part of API response used in ESDT queries
 *
 * @author carlo_stanciu
 */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = TokenList.TokenListBuilder.class)
public final class TokenList {
    @JsonProperty("tokens")
    private final Set tokens;

    TokenList(final Set tokens) {
        this.tokens = tokens;
    }


    @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "", buildMethodName = "build")
    public static class TokenListBuilder {
        private Set tokens;

        TokenListBuilder() {
        }

        /**
         * @return {@code this}.
         */
        @JsonProperty("tokens")
        public TokenList.TokenListBuilder tokens(final Set tokens) {
            this.tokens = tokens;
            return this;
        }

        public TokenList build() {
            return new TokenList(this.tokens);
        }

        @Override
        public String toString() {
            return "TokenList.TokenListBuilder(tokens=" + this.tokens + ")";
        }
    }

    public static TokenList.TokenListBuilder builder() {
        return new TokenList.TokenListBuilder();
    }

    public Set getTokens() {
        return this.tokens;
    }

    @Override
    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof TokenList)) return false;
        final TokenList other = (TokenList) o;
        final Object this$tokens = this.getTokens();
        final Object other$tokens = other.getTokens();
        if (this$tokens == null ? other$tokens != null : !this$tokens.equals(other$tokens)) return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $tokens = this.getTokens();
        result = result * PRIME + ($tokens == null ? 43 : $tokens.hashCode());
        return result;
    }

    @Override
    public String toString() {
        return "TokenList(tokens=" + this.getTokens() + ")";
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy