com.testfabrik.webmate.javasdk.testmgmt.TestTemplateId Maven / Gradle / Ivy
The newest version!
package com.testfabrik.webmate.javasdk.testmgmt;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.UUID;
public class TestTemplateId {
private final UUID value;
public TestTemplateId(final UUID value) {
this.value = value;
}
@JsonCreator
static TestTemplateId of(final String idStr) {
return new TestTemplateId(UUID.fromString(idStr));
}
@Override
@JsonValue
public String toString() {
return this.value.toString();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
TestTemplateId testId = (TestTemplateId) o;
return value.equals(testId.value);
}
@Override
public int hashCode() {
return value.hashCode();
}
}