com.palantir.atlasdb.timelock.api.ConjureSingleTimestamp Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of timelock-api-objects Show documentation
Show all versions of timelock-api-objects Show documentation
Palantir open source project
package com.palantir.atlasdb.timelock.api;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;
@Generated("com.palantir.conjure.java.types.AliasGenerator")
public final class ConjureSingleTimestamp {
private final long value;
private ConjureSingleTimestamp(long value) {
this.value = value;
}
@JsonValue
public long get() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@Override
public boolean equals(@Nullable Object other) {
return this == other || (other instanceof ConjureSingleTimestamp && equalTo((ConjureSingleTimestamp) other));
}
private boolean equalTo(ConjureSingleTimestamp other) {
return this.value == other.value;
}
@Override
public int hashCode() {
return Long.hashCode(this.value);
}
@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
public static ConjureSingleTimestamp of(long value) {
return new ConjureSingleTimestamp(value);
}
}