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

com.kintone.client.model.record.MultiSelectFieldValue Maven / Gradle / Ivy

// Generated by delombok at Fri Jan 21 13:34:53 JST 2022
package com.kintone.client.model.record;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * A value object for a Multi-choice field.
 */
public final class MultiSelectFieldValue implements FieldValue {
    /**
     * The list of selected options of the Multi-choice.
     */
    private final List values;

    public MultiSelectFieldValue(List values) {
        this.values = Collections.unmodifiableList(values);
    }

    public MultiSelectFieldValue(String... values) {
        this(Arrays.asList(values));
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public FieldType getType() {
        return FieldType.MULTI_SELECT;
    }

    /**
     * The list of selected options of the Multi-choice.
     */
    @java.lang.SuppressWarnings("all")
    public List getValues() {
        return this.values;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    public boolean equals(final java.lang.Object o) {
        if (o == this) return true;
        if (!(o instanceof MultiSelectFieldValue)) return false;
        final MultiSelectFieldValue other = (MultiSelectFieldValue) o;
        final java.lang.Object this$values = this.getValues();
        final java.lang.Object other$values = other.getValues();
        if (this$values == null ? other$values != null : !this$values.equals(other$values)) return false;
        return true;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final java.lang.Object $values = this.getValues();
        result = result * PRIME + ($values == null ? 43 : $values.hashCode());
        return result;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    public java.lang.String toString() {
        return "MultiSelectFieldValue(values=" + this.getValues() + ")";
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy