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

com.mercateo.eventstore.domain.EventStoreName Maven / Gradle / Ivy

There is a newer version: 0.3.5
Show newest version
package com.mercateo.eventstore.domain;

import java.util.Objects;
import javax.annotation.Generated;
import javax.annotation.Nullable;
import javax.annotation.ParametersAreNonnullByDefault;
import javax.annotation.concurrent.Immutable;

/**
 * Immutable implementation of {@link _EventStoreName}.
 * 

* Use the static factory method to create immutable instances: * {@code EventStoreName.of()}. */ @SuppressWarnings({"all"}) @ParametersAreNonnullByDefault @Generated({"Immutables.generator", "_EventStoreName"}) @Immutable public final class EventStoreName extends com.mercateo.eventstore.domain._EventStoreName { private final String value; private EventStoreName(String value) { this.value = Objects.requireNonNull(value, "value"); } /** * @return The value of the {@code value} attribute */ @Override public String value() { return value; } /** * This instance is equal to all instances of {@code EventStoreName} that have equal attribute values. * @return {@code true} if {@code this} is equal to {@code another} instance */ @Override public boolean equals(@Nullable Object another) { if (this == another) return true; return another instanceof EventStoreName && equalTo((EventStoreName) another); } private boolean equalTo(EventStoreName another) { return value.equals(another.value); } /** * Computes a hash code from attributes: {@code value}. * @return hashCode value */ @Override public int hashCode() { int h = 5381; h += (h << 5) + value.hashCode(); return h; } /** * Construct a new immutable {@code EventStoreName} instance. * @param value The value for the {@code value} attribute * @return An immutable EventStoreName instance */ public static EventStoreName of(String value) { return new EventStoreName(value); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy