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

io.molr.commons.domain.MissionHandle Maven / Gradle / Ivy

/**
 * Copyright (c) 2018 European Organisation for Nuclear Research (CERN), All Rights Reserved.
 */

package io.molr.commons.domain;

import java.util.Objects;

public final class MissionHandle {

    private final String id;

    private MissionHandle(String id) {
        this.id = id;
    }

    public static MissionHandle ofId(String id) {
        return new MissionHandle(id);
    }

    public String id() {
        return id;
    }

    @Override
    public String toString() {
        return "MissionHandle [id=" + id + "]";
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        MissionHandle that = (MissionHandle) o;
        return Objects.equals(id, that.id);
    }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy