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

com.redis.om.spring.tuple.Duodecuple Maven / Gradle / Ivy

package com.redis.om.spring.tuple;

import com.redis.om.spring.tuple.accessor.EighthAccessor;
import com.redis.om.spring.tuple.accessor.EleventhAccessor;
import com.redis.om.spring.tuple.accessor.FifthAccessor;
import com.redis.om.spring.tuple.accessor.FirstAccessor;
import com.redis.om.spring.tuple.accessor.FourthAccessor;
import com.redis.om.spring.tuple.accessor.NinthAccessor;
import com.redis.om.spring.tuple.accessor.SecondAccessor;
import com.redis.om.spring.tuple.accessor.SeventhAccessor;
import com.redis.om.spring.tuple.accessor.SixthAccessor;
import com.redis.om.spring.tuple.accessor.TenthAccessor;
import com.redis.om.spring.tuple.accessor.ThirdAccessor;
import com.redis.om.spring.tuple.accessor.TwelfthAccessor;

public interface Duodecuple extends Tuple {

  E1 getFirst();

  E2 getSecond();

  E3 getThird();

  E4 getFourth();

  E5 getFifth();

  E6 getSixth();

  E7 getSeventh();

  E8 getEighth();

  E9 getNinth();

  E10 getTenth();

  E11 getEleventh();

  E12 getTwelfth();

  @Override
  default int size() {
    return 12;
  }

  default Object get(int index) {
    switch (index) {
      case 0:
        return getFirst();
      case 1:
        return getSecond();
      case 2:
        return getThird();
      case 3:
        return getFourth();
      case 4:
        return getFifth();
      case 5:
        return getSixth();
      case 6:
        return getSeventh();
      case 7:
        return getEighth();
      case 8:
        return getNinth();
      case 9:
        return getTenth();
      case 10:
        return getEleventh();
      case 11:
        return getTwelfth();
      default:
        throw new IndexOutOfBoundsException(
            String.format("Index %d is outside bounds of tuple of degree %s", index, size()));
    }
  }

  static  FirstAccessor, E1> getFirstGetter() {
    return Duodecuple::getFirst;
  }

  static  SecondAccessor, E2> getSecondGetter() {
    return Duodecuple::getSecond;
  }

  static  ThirdAccessor, E3> getThirdGetter() {
    return Duodecuple::getThird;
  }

  static  FourthAccessor, E4> getFourthGetter() {
    return Duodecuple::getFourth;
  }

  static  FifthAccessor, E5> getFifthGetter() {
    return Duodecuple::getFifth;
  }

  static  SixthAccessor, E6> getSixthGetter() {
    return Duodecuple::getSixth;
  }

  static  SeventhAccessor, E7> getSeventhGetter() {
    return Duodecuple::getSeventh;
  }

  static  EighthAccessor, E8> getEighthGetter() {
    return Duodecuple::getEighth;
  }

  static  NinthAccessor, E9> getNinthGetter() {
    return Duodecuple::getNinth;
  }

  static  TenthAccessor, E10> getTenthGetter() {
    return Duodecuple::getTenth;
  }

  static  EleventhAccessor, E11> getEleventhGetter() {
    return Duodecuple::getEleventh;
  }

  static  TwelfthAccessor, E12> getTwelfthGetter() {
    return Duodecuple::getTwelfth;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy