io.deepsense.neptune.clientlibrary.models.impl.parameters.ParameterImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of neptune-client-library Show documentation
Show all versions of neptune-client-library Show documentation
Enables integration with Neptune in your Java code
/**
* Copyright (c) 2016, CodiLime Inc.
*/
package io.deepsense.neptune.clientlibrary.models.impl.parameters;
import com.google.common.base.Preconditions;
import io.deepsense.neptune.clientlibrary.models.Parameter;
import io.deepsense.neptune.clientlibrary.models.ParameterType;
import io.deepsense.neptune.clientlibrary.models.ParameterValue;
import java.util.Objects;
public class ParameterImpl implements Parameter {
private final String name;
private final ParameterType type;
private final ParameterValue value;
public ParameterImpl(String name, ParameterType type, ParameterValue value) {
this.name = Preconditions.checkNotNull(name);
this.type = Preconditions.checkNotNull(type);
this.value = Preconditions.checkNotNull(value);
}
@Override
public String getName() {
return name;
}
@Override
public ParameterType getType() {
return type;
}
@Override
public ParameterValue getValue() {
return value;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ParameterImpl parameter = (ParameterImpl) o;
return Objects.equals(name, parameter.name)
&& type == parameter.type
&& Objects.equals(value, parameter.value);
}
@Override
public int hashCode() {
return Objects.hash(name, type, value);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy