package com.atlassian.bitbucket.mesh.network;

import javax.annotation.Nonnull;

import static java.util.Objects.requireNonNull;

public class MeshNodeUpdatedEvent extends MeshNodeEvent {

    private final MeshNode oldValue;

    public MeshNodeUpdatedEvent(@Nonnull MeshNode oldValue, @Nonnull MeshNode newValue) {
        super(newValue);

        this.oldValue = requireNonNull(oldValue, "oldValue");
    }

    @Nonnull
    public MeshNode getOldValue() {
        return oldValue;
    }
}
