All Downloads are FREE. Search and download functionalities are using the official Maven repository.

annotations.com.cognite.client.AutoValue_ApiBase_AdapterIterator Maven / Gradle / Ivy

There is a newer version: 2.3.3
Show newest version
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