org.testobject.appium.common.data.Id Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of testobject-appium-java-api Show documentation
Show all versions of testobject-appium-java-api Show documentation
java wrapper for testobject's appium java apis
package org.testobject.appium.common.data;
import com.fasterxml.jackson.annotation.JsonValue;
import com.google.common.base.Preconditions;
public abstract class Id {
private final T value;
protected Id(T value) {
Preconditions.checkNotNull(value);
this.value = value;
}
@JsonValue
public T value() {
return value;
}
@Override
public int hashCode() {
return value.hashCode();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
@SuppressWarnings("unchecked")
Id other = (Id) obj;
if (value == null) {
if (other.value != null)
return false;
} else if (!value.equals(other.value))
return false;
return true;
}
@Override
public String toString() {
return String.valueOf(value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy