org.interledger.link.LinkId Maven / Gradle / Ivy
Show all versions of link-core Show documentation
package org.interledger.link;
import java.util.Objects;
import javax.annotation.CheckReturnValue;
import javax.annotation.ParametersAreNonnullByDefault;
import javax.annotation.concurrent.Immutable;
import org.immutables.value.Generated;
/**
* Immutable implementation of {@link Ids._LinkId}.
*
* Use the static factory method to create immutable instances:
* {@code LinkId.of()}.
*/
@Generated(from = "Ids._LinkId", generator = "Immutables")
@SuppressWarnings({"TypeName", "all"})
@ParametersAreNonnullByDefault
@javax.annotation.Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class LinkId extends Ids._LinkId {
private final String value;
private LinkId(String value) {
this.value = Objects.requireNonNull(value, "value");
}
/**
* @return The value of the {@code value} attribute
*/
@Override
public String value() {
return value;
}
/**
* Construct a new immutable {@code LinkId} instance.
* @param value The value for the {@code value} attribute
* @return An immutable LinkId instance
*/
public static LinkId of(String value) {
return new LinkId(value);
}
}