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

io.github.spair.byond.dmi.DmiDiff Maven / Gradle / Ivy

There is a newer version: 2.1
Show newest version
package io.github.spair.byond.dmi;

import lombok.AccessLevel;
import lombok.Data;
import lombok.Setter;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.List;
import java.util.Objects;

@Data
@Setter(AccessLevel.PACKAGE)
@SuppressWarnings("WeakerAccess")
public class DmiDiff {

    @Nullable private DmiMeta oldMeta;
    @Nullable private DmiMeta newMeta;
    @Nonnull private List diffs;

    DmiDiff(@Nonnull final List diffs) {
        this.diffs = diffs;
    }

    /**
     * Shows that current diff was generated from the same Dmi's.
     * @return true, if Dmi's was the same, otherwise false
     */
    public boolean isSame() {
        return Objects.equals(oldMeta, newMeta) && diffs.isEmpty();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy