io.everitoken.sdk.java.dto.NameableResource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chain-sdk Show documentation
Show all versions of chain-sdk Show documentation
Official Java SDK for everiToken public chain. https://www.everitoken.io
package io.everitoken.sdk.java.dto;
import com.alibaba.fastjson.JSON;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
public class NameableResource implements Namable {
protected String name;
NameableResource(String name) {
this.name = name;
}
@NotNull
@Contract("_ -> new")
public static NameableResource create(String name) {
return new NameableResource(name);
}
@Override
public String getName() {
return name;
}
@Override
public String toString() {
return JSON.toJSONString(this);
}
}