annotations.com.cognite.client.AutoValue_ApiBase_AdapterIterator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cdf-sdk-java Show documentation
Show all versions of cdf-sdk-java Show documentation
Java SDK for reading and writing from/to CDF resources.
package com.cognite.client;
import java.util.Iterator;
import java.util.List;
import java.util.function.Function;
import javax.annotation.processing.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_ApiBase_AdapterIterator extends ApiBase.AdapterIterator {
private final Iterator> inputIterator;
private final Function mappingFunction;
private AutoValue_ApiBase_AdapterIterator(
Iterator> inputIterator,
Function mappingFunction) {
this.inputIterator = inputIterator;
this.mappingFunction = mappingFunction;
}
@Override
Iterator> getInputIterator() {
return inputIterator;
}
@Override
Function getMappingFunction() {
return mappingFunction;
}
@Override
public String toString() {
return "AdapterIterator{"
+ "inputIterator=" + inputIterator + ", "
+ "mappingFunction=" + mappingFunction
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof ApiBase.AdapterIterator) {
ApiBase.AdapterIterator, ?> that = (ApiBase.AdapterIterator, ?>) o;
return this.inputIterator.equals(that.getInputIterator())
&& this.mappingFunction.equals(that.getMappingFunction());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= inputIterator.hashCode();
h$ *= 1000003;
h$ ^= mappingFunction.hashCode();
return h$;
}
static final class Builder extends ApiBase.AdapterIterator.Builder {
private Iterator> inputIterator;
private Function mappingFunction;
Builder() {
}
@Override
ApiBase.AdapterIterator.Builder setInputIterator(Iterator> inputIterator) {
if (inputIterator == null) {
throw new NullPointerException("Null inputIterator");
}
this.inputIterator = inputIterator;
return this;
}
@Override
ApiBase.AdapterIterator.Builder setMappingFunction(Function mappingFunction) {
if (mappingFunction == null) {
throw new NullPointerException("Null mappingFunction");
}
this.mappingFunction = mappingFunction;
return this;
}
@Override
ApiBase.AdapterIterator build() {
if (this.inputIterator == null
|| this.mappingFunction == null) {
StringBuilder missing = new StringBuilder();
if (this.inputIterator == null) {
missing.append(" inputIterator");
}
if (this.mappingFunction == null) {
missing.append(" mappingFunction");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_ApiBase_AdapterIterator(
this.inputIterator,
this.mappingFunction);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy