com.speedment.common.tuple.internal.nonnullable.mapper.Tuple19MapperImpl Maven / Gradle / Ivy
Show all versions of tool-deploy Show documentation
/*
*
* Copyright (c) 2006-2019, Speedment, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); You may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.speedment.common.tuple.internal.nonnullable.mapper;
import com.speedment.common.tuple.Tuple19;
import com.speedment.common.tuple.TupleMapper;
import com.speedment.common.tuple.Tuples;
import java.util.function.Function;
import static java.util.Objects.requireNonNull;
/**
* An implementation class of a {@link TupleMapper } of degree 19
*
* Generated by com.speedment.sources.pattern.tuple.TupleMapperImplPattern
*
* @param Type of the original object for the mapper to use when creating
* a {@code Tuple }
* @param type of element 0
* @param type of element 1
* @param type of element 2
* @param type of element 3
* @param type of element 4
* @param type of element 5
* @param type of element 6
* @param type of element 7
* @param type of element 8
* @param type of element 9
* @param type of element 10
* @param type of element 11
* @param type of element 12
* @param type of element 13
* @param type of element 14
* @param type of element 15
* @param type of element 16
* @param type of element 17
* @param type of element 18
*
* @author Per Minborg
*/
public final class Tuple19MapperImpl implements TupleMapper> {
private final Function m0;
private final Function m1;
private final Function m2;
private final Function m3;
private final Function m4;
private final Function m5;
private final Function m6;
private final Function m7;
private final Function m8;
private final Function m9;
private final Function m10;
private final Function m11;
private final Function m12;
private final Function m13;
private final Function m14;
private final Function m15;
private final Function m16;
private final Function m17;
private final Function m18;
/**
* Constructs a {@link TupleMapper } that can create {@link Tuple19 }.
*
* @param m0 mapper to apply for element 0
* @param m1 mapper to apply for element 1
* @param m2 mapper to apply for element 2
* @param m3 mapper to apply for element 3
* @param m4 mapper to apply for element 4
* @param m5 mapper to apply for element 5
* @param m6 mapper to apply for element 6
* @param m7 mapper to apply for element 7
* @param m8 mapper to apply for element 8
* @param m9 mapper to apply for element 9
* @param m10 mapper to apply for element 10
* @param m11 mapper to apply for element 11
* @param m12 mapper to apply for element 12
* @param m13 mapper to apply for element 13
* @param m14 mapper to apply for element 14
* @param m15 mapper to apply for element 15
* @param m16 mapper to apply for element 16
* @param m17 mapper to apply for element 17
* @param m18 mapper to apply for element 18
*/
public Tuple19MapperImpl(
Function m0,
Function m1,
Function m2,
Function m3,
Function m4,
Function m5,
Function m6,
Function m7,
Function m8,
Function m9,
Function m10,
Function m11,
Function m12,
Function m13,
Function m14,
Function m15,
Function m16,
Function m17,
Function m18) {
this.m0 = requireNonNull(m0);
this.m1 = requireNonNull(m1);
this.m2 = requireNonNull(m2);
this.m3 = requireNonNull(m3);
this.m4 = requireNonNull(m4);
this.m5 = requireNonNull(m5);
this.m6 = requireNonNull(m6);
this.m7 = requireNonNull(m7);
this.m8 = requireNonNull(m8);
this.m9 = requireNonNull(m9);
this.m10 = requireNonNull(m10);
this.m11 = requireNonNull(m11);
this.m12 = requireNonNull(m12);
this.m13 = requireNonNull(m13);
this.m14 = requireNonNull(m14);
this.m15 = requireNonNull(m15);
this.m16 = requireNonNull(m16);
this.m17 = requireNonNull(m17);
this.m18 = requireNonNull(m18);
}
@Override
public Tuple19 apply(T t) {
return Tuples.of(
m0.apply(t),
m1.apply(t),
m2.apply(t),
m3.apply(t),
m4.apply(t),
m5.apply(t),
m6.apply(t),
m7.apply(t),
m8.apply(t),
m9.apply(t),
m10.apply(t),
m11.apply(t),
m12.apply(t),
m13.apply(t),
m14.apply(t),
m15.apply(t),
m16.apply(t),
m17.apply(t),
m18.apply(t)
);
}
@Override
public int degree() {
return 19;
}
@Override
public Function get(int index) {
switch(index){
case 0 : return get0();
case 1 : return get1();
case 2 : return get2();
case 3 : return get3();
case 4 : return get4();
case 5 : return get5();
case 6 : return get6();
case 7 : return get7();
case 8 : return get8();
case 9 : return get9();
case 10 : return get10();
case 11 : return get11();
case 12 : return get12();
case 13 : return get13();
case 14 : return get14();
case 15 : return get15();
case 16 : return get16();
case 17 : return get17();
case 18 : return get18();
default : throw new IndexOutOfBoundsException();
}
}
public Function get0() {
return m0;
}
public Function get1() {
return m1;
}
public Function get2() {
return m2;
}
public Function get3() {
return m3;
}
public Function get4() {
return m4;
}
public Function get5() {
return m5;
}
public Function get6() {
return m6;
}
public Function get7() {
return m7;
}
public Function get8() {
return m8;
}
public Function get9() {
return m9;
}
public Function get10() {
return m10;
}
public Function get11() {
return m11;
}
public Function get12() {
return m12;
}
public Function get13() {
return m13;
}
public Function get14() {
return m14;
}
public Function get15() {
return m15;
}
public Function get16() {
return m16;
}
public Function get17() {
return m17;
}
public Function get18() {
return m18;
}
}