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

com.redis.om.spring.tuple.impl.mapper.OctupleMapperImpl Maven / Gradle / Ivy

package com.redis.om.spring.tuple.impl.mapper;

import java.util.function.Function;

import com.redis.om.spring.tuple.AbstractTupleMapper;
import com.redis.om.spring.tuple.Octuple;
import com.redis.om.spring.tuple.Tuples;

public final class OctupleMapperImpl
    extends AbstractTupleMapper> {

  public OctupleMapperImpl(Function m0, Function m1, Function m2, Function m3,
      Function m4, Function m5, Function m6, Function m7) {
    super(8);
    set(0, m0);
    set(1, m1);
    set(2, m2);
    set(3, m3);
    set(4, m4);
    set(5, m5);
    set(6, m6);
    set(7, m7);
  }

  @Override
  public Octuple apply(T t) {
    return Tuples.of(getFirst().apply(t), getSecond().apply(t), getThird().apply(t), getFourth().apply(t),
        getFifth().apply(t), getSixth().apply(t), getSeventh().apply(t), getEighth().apply(t));
  }

  public Function getFirst() {
    return getAndCast(0);
  }

  public Function getSecond() {
    return getAndCast(1);
  }

  public Function getThird() {
    return getAndCast(2);
  }

  public Function getFourth() {
    return getAndCast(3);
  }

  public Function getFifth() {
    return getAndCast(4);
  }

  public Function getSixth() {
    return getAndCast(5);
  }

  public Function getSeventh() {
    return getAndCast(6);
  }

  public Function getEighth() {
    return getAndCast(7);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy