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

no.unit.nva.model.FileSet Maven / Gradle / Ivy

There is a newer version: 0.23.2
Show newest version
package no.unit.nva.model;

import static java.util.Objects.isNull;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import nva.commons.core.JacocoGenerated;

@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
public class FileSet {

    private List files;

    public FileSet() {

    }

    private FileSet(Builder builder) {
        setFiles(builder.files);
    }

    public List getFiles() {
        return isNull(files) ? Collections.emptyList() : files;
    }

    public void setFiles(List files) {
        this.files = files;
    }

    @JacocoGenerated
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        FileSet fileSet = (FileSet) o;
        return Objects.equals(getFiles(), fileSet.getFiles());
    }

    @JacocoGenerated
    @Override
    public int hashCode() {
        return Objects.hash(getFiles());
    }

    public static final class Builder {

        private List files;

        public Builder() {
        }

        public Builder withFiles(List files) {
            this.files = files;
            return this;
        }

        public FileSet build() {
            return new FileSet(this);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy