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

com.redis.om.spring.tuple.impl.mapper.UndecupleMapperImpl 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.Tuples;
import com.redis.om.spring.tuple.Undecuple;

public final class UndecupleMapperImpl
extends AbstractTupleMapper> {

    public UndecupleMapperImpl(
            Function m0,
            Function m1,
            Function m2,
            Function m3,
            Function m4,
            Function m5,
            Function m6,
            Function m7,
            Function m8,
            Function m9,
            Function m10) {
        super(11);
        set(0, m0);
        set(1, m1);
        set(2, m2);
        set(3, m3);
        set(4, m4);
        set(5, m5);
        set(6, m6);
        set(7, m7);
        set(8, m8);
        set(9, m9);
        set(10, m10);
    }

    @Override
    public Undecuple 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),
            getNinth().apply(t),
            getTenth().apply(t),
            getEleventh().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);
    }

    public Function getNinth() {
        return getAndCast(8);
    }

    public Function getTenth() {
        return getAndCast(9);
    }

    public Function getEleventh() {
        return getAndCast(10);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy