Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.aol.cyclops.lambda.tuple.Concatenate Maven / Gradle / Ivy
package com.aol.cyclops.lambda.tuple;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
public interface Concatenate{
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10),(PowerTuples.tuple(100));
* // [10,100]
* }
*
**/
public static PTuple2 concat(PTuple1 first, PTuple1 concatWith){
return new TupleImpl(Arrays.asList(),2){
public T1 v1(){
return first.v1();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),concatWith.v1());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10),(PowerTuples.tuple(100,101));
* // [10,100,101]
* }
*
**/
public static PTuple3 concat(PTuple1 first, PTuple2 concatWith){
return new TupleImpl(Arrays.asList(),3){
public T1 v1(){
return first.v1();
}
public NT2 v2(){
return concatWith.v2();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),concatWith.v1(),concatWith.v2());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10),(PowerTuples.tuple(100,101,102));
* // [10,100,101,102]
* }
*
**/
public static PTuple4 concat(PTuple1 first, PTuple3 concatWith){
return new TupleImpl(Arrays.asList(),4){
public T1 v1(){
return first.v1();
}
public NT2 v2(){
return concatWith.v2();
}
public NT3 v3(){
return concatWith.v3();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),concatWith.v1(),concatWith.v2(),concatWith.v3());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10),(PowerTuples.tuple(100,101,102,103));
* // [10,100,101,102,103]
* }
*
**/
public static PTuple5 concat(PTuple1 first, PTuple4 concatWith){
return new TupleImpl(Arrays.asList(),5){
public T1 v1(){
return first.v1();
}
public NT2 v2(){
return concatWith.v2();
}
public NT3 v3(){
return concatWith.v3();
}
public NT4 v4(){
return concatWith.v4();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),concatWith.v1(),concatWith.v2(),concatWith.v3(),concatWith.v4());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10),(PowerTuples.tuple(100,101,102,103,104));
* // [10,100,101,102,103,104]
* }
*
**/
public static PTuple6 concat(PTuple1 first, PTuple5 concatWith){
return new TupleImpl(Arrays.asList(),6){
public T1 v1(){
return first.v1();
}
public NT2 v2(){
return concatWith.v2();
}
public NT3 v3(){
return concatWith.v3();
}
public NT4 v4(){
return concatWith.v4();
}
public NT5 v5(){
return concatWith.v5();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),concatWith.v1(),concatWith.v2(),concatWith.v3(),concatWith.v4(),concatWith.v5());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10),(PowerTuples.tuple(100,101,102,103,104,105));
* // [10,100,101,102,103,104,105]
* }
*
**/
public static PTuple7 concat(PTuple1 first, PTuple6 concatWith){
return new TupleImpl(Arrays.asList(),7){
public T1 v1(){
return first.v1();
}
public NT2 v2(){
return concatWith.v2();
}
public NT3 v3(){
return concatWith.v3();
}
public NT4 v4(){
return concatWith.v4();
}
public NT5 v5(){
return concatWith.v5();
}
public NT6 v6(){
return concatWith.v6();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),concatWith.v1(),concatWith.v2(),concatWith.v3(),concatWith.v4(),concatWith.v5(),concatWith.v6());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10),(PowerTuples.tuple(100,101,102,103,104,105,106));
* // [10,100,101,102,103,104,105,106]
* }
*
**/
public static PTuple8 concat(PTuple1 first, PTuple7 concatWith){
return new TupleImpl(Arrays.asList(),8){
public T1 v1(){
return first.v1();
}
public NT2 v2(){
return concatWith.v2();
}
public NT3 v3(){
return concatWith.v3();
}
public NT4 v4(){
return concatWith.v4();
}
public NT5 v5(){
return concatWith.v5();
}
public NT6 v6(){
return concatWith.v6();
}
public NT7 v7(){
return concatWith.v7();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),concatWith.v1(),concatWith.v2(),concatWith.v3(),concatWith.v4(),concatWith.v5(),concatWith.v6(),concatWith.v7());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10,11),(PowerTuples.tuple(100));
* // [10,11,100]
* }
*
**/
public static PTuple3 concat(PTuple2 first, PTuple1 concatWith){
return new TupleImpl(Arrays.asList(),3){
public T1 v1(){
return first.v1();
}
public T2 v2(){
return first.v2();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),first.v2(),concatWith.v1());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10,11),(PowerTuples.tuple(100,101));
* // [10,11,100,101]
* }
*
**/
public static PTuple4 concat(PTuple2 first, PTuple2 concatWith){
return new TupleImpl(Arrays.asList(),4){
public T1 v1(){
return first.v1();
}
public T2 v2(){
return first.v2();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),first.v2(),concatWith.v1(),concatWith.v2());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10,11),(PowerTuples.tuple(100,101,102));
* // [10,11,100,101,102]
* }
*
**/
public static PTuple5 concat(PTuple2 first, PTuple3 concatWith){
return new TupleImpl(Arrays.asList(),5){
public T1 v1(){
return first.v1();
}
public T2 v2(){
return first.v2();
}
public NT3 v3(){
return concatWith.v3();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),first.v2(),concatWith.v1(),concatWith.v2(),concatWith.v3());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10,11),(PowerTuples.tuple(100,101,102,103));
* // [10,11,100,101,102,103]
* }
*
**/
public static PTuple6 concat(PTuple2 first, PTuple4 concatWith){
return new TupleImpl(Arrays.asList(),6){
public T1 v1(){
return first.v1();
}
public T2 v2(){
return first.v2();
}
public NT3 v3(){
return concatWith.v3();
}
public NT4 v4(){
return concatWith.v4();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),first.v2(),concatWith.v1(),concatWith.v2(),concatWith.v3(),concatWith.v4());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10,11),(PowerTuples.tuple(100,101,102,103,104));
* // [10,11,100,101,102,103,104]
* }
*
**/
public static PTuple7 concat(PTuple2 first, PTuple5 concatWith){
return new TupleImpl(Arrays.asList(),7){
public T1 v1(){
return first.v1();
}
public T2 v2(){
return first.v2();
}
public NT3 v3(){
return concatWith.v3();
}
public NT4 v4(){
return concatWith.v4();
}
public NT5 v5(){
return concatWith.v5();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),first.v2(),concatWith.v1(),concatWith.v2(),concatWith.v3(),concatWith.v4(),concatWith.v5());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10,11),(PowerTuples.tuple(100,101,102,103,104,105));
* // [10,11,100,101,102,103,104,105]
* }
*
**/
public static PTuple8 concat(PTuple2 first, PTuple6 concatWith){
return new TupleImpl(Arrays.asList(),8){
public T1 v1(){
return first.v1();
}
public T2 v2(){
return first.v2();
}
public NT3 v3(){
return concatWith.v3();
}
public NT4 v4(){
return concatWith.v4();
}
public NT5 v5(){
return concatWith.v5();
}
public NT6 v6(){
return concatWith.v6();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),first.v2(),concatWith.v1(),concatWith.v2(),concatWith.v3(),concatWith.v4(),concatWith.v5(),concatWith.v6());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10,11,12),(PowerTuples.tuple(100));
* // [10,11,12,100]
* }
*
**/
public static PTuple4 concat(PTuple3 first, PTuple1 concatWith){
return new TupleImpl(Arrays.asList(),4){
public T1 v1(){
return first.v1();
}
public T2 v2(){
return first.v2();
}
public T3 v3(){
return first.v3();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),first.v2(),first.v3(),concatWith.v1());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10,11,12),(PowerTuples.tuple(100,101));
* // [10,11,12,100,101]
* }
*
**/
public static PTuple5 concat(PTuple3 first, PTuple2 concatWith){
return new TupleImpl(Arrays.asList(),5){
public T1 v1(){
return first.v1();
}
public T2 v2(){
return first.v2();
}
public T3 v3(){
return first.v3();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),first.v2(),first.v3(),concatWith.v1(),concatWith.v2());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10,11,12),(PowerTuples.tuple(100,101,102));
* // [10,11,12,100,101,102]
* }
*
**/
public static PTuple6 concat(PTuple3 first, PTuple3 concatWith){
return new TupleImpl(Arrays.asList(),6){
public T1 v1(){
return first.v1();
}
public T2 v2(){
return first.v2();
}
public T3 v3(){
return first.v3();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),first.v2(),first.v3(),concatWith.v1(),concatWith.v2(),concatWith.v3());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10,11,12),(PowerTuples.tuple(100,101,102,103));
* // [10,11,12,100,101,102,103]
* }
*
**/
public static PTuple7 concat(PTuple3 first, PTuple4 concatWith){
return new TupleImpl(Arrays.asList(),7){
public T1 v1(){
return first.v1();
}
public T2 v2(){
return first.v2();
}
public T3 v3(){
return first.v3();
}
public NT4 v4(){
return concatWith.v4();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),first.v2(),first.v3(),concatWith.v1(),concatWith.v2(),concatWith.v3(),concatWith.v4());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10,11,12),(PowerTuples.tuple(100,101,102,103,104));
* // [10,11,12,100,101,102,103,104]
* }
*
**/
public static PTuple8 concat(PTuple3 first, PTuple5 concatWith){
return new TupleImpl(Arrays.asList(),8){
public T1 v1(){
return first.v1();
}
public T2 v2(){
return first.v2();
}
public T3 v3(){
return first.v3();
}
public NT4 v4(){
return concatWith.v4();
}
public NT5 v5(){
return concatWith.v5();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),first.v2(),first.v3(),concatWith.v1(),concatWith.v2(),concatWith.v3(),concatWith.v4(),concatWith.v5());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10,11,12,13),(PowerTuples.tuple(100));
* // [10,11,12,13,100]
* }
*
**/
public static PTuple5 concat(PTuple4 first, PTuple1 concatWith){
return new TupleImpl(Arrays.asList(),5){
public T1 v1(){
return first.v1();
}
public T2 v2(){
return first.v2();
}
public T3 v3(){
return first.v3();
}
public T4 v4(){
return first.v4();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),first.v2(),first.v3(),first.v4(),concatWith.v1());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10,11,12,13),(PowerTuples.tuple(100,101));
* // [10,11,12,13,100,101]
* }
*
**/
public static PTuple6 concat(PTuple4 first, PTuple2 concatWith){
return new TupleImpl(Arrays.asList(),6){
public T1 v1(){
return first.v1();
}
public T2 v2(){
return first.v2();
}
public T3 v3(){
return first.v3();
}
public T4 v4(){
return first.v4();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),first.v2(),first.v3(),first.v4(),concatWith.v1(),concatWith.v2());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10,11,12,13),(PowerTuples.tuple(100,101,102));
* // [10,11,12,13,100,101,102]
* }
*
**/
public static PTuple7 concat(PTuple4 first, PTuple3 concatWith){
return new TupleImpl(Arrays.asList(),7){
public T1 v1(){
return first.v1();
}
public T2 v2(){
return first.v2();
}
public T3 v3(){
return first.v3();
}
public T4 v4(){
return first.v4();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),first.v2(),first.v3(),first.v4(),concatWith.v1(),concatWith.v2(),concatWith.v3());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10,11,12,13),(PowerTuples.tuple(100,101,102,103));
* // [10,11,12,13,100,101,102,103]
* }
*
**/
public static PTuple8 concat(PTuple4 first, PTuple4 concatWith){
return new TupleImpl(Arrays.asList(),8){
public T1 v1(){
return first.v1();
}
public T2 v2(){
return first.v2();
}
public T3 v3(){
return first.v3();
}
public T4 v4(){
return first.v4();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),first.v2(),first.v3(),first.v4(),concatWith.v1(),concatWith.v2(),concatWith.v3(),concatWith.v4());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10,11,12,13,14),(PowerTuples.tuple(100));
* // [10,11,12,13,14,100]
* }
*
**/
public static PTuple6 concat(PTuple5 first, PTuple1 concatWith){
return new TupleImpl(Arrays.asList(),6){
public T1 v1(){
return first.v1();
}
public T2 v2(){
return first.v2();
}
public T3 v3(){
return first.v3();
}
public T4 v4(){
return first.v4();
}
public T5 v5(){
return first.v5();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),first.v2(),first.v3(),first.v4(),first.v5(),concatWith.v1());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10,11,12,13,14),(PowerTuples.tuple(100,101));
* // [10,11,12,13,14,100,101]
* }
*
**/
public static PTuple7 concat(PTuple5 first, PTuple2 concatWith){
return new TupleImpl(Arrays.asList(),7){
public T1 v1(){
return first.v1();
}
public T2 v2(){
return first.v2();
}
public T3 v3(){
return first.v3();
}
public T4 v4(){
return first.v4();
}
public T5 v5(){
return first.v5();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),first.v2(),first.v3(),first.v4(),first.v5(),concatWith.v1(),concatWith.v2());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10,11,12,13,14),(PowerTuples.tuple(100,101,102));
* // [10,11,12,13,14,100,101,102]
* }
*
**/
public static PTuple8 concat(PTuple5 first, PTuple3 concatWith){
return new TupleImpl(Arrays.asList(),8){
public T1 v1(){
return first.v1();
}
public T2 v2(){
return first.v2();
}
public T3 v3(){
return first.v3();
}
public T4 v4(){
return first.v4();
}
public T5 v5(){
return first.v5();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),first.v2(),first.v3(),first.v4(),first.v5(),concatWith.v1(),concatWith.v2(),concatWith.v3());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10,11,12,13,14,15),(PowerTuples.tuple(100));
* // [10,11,12,13,14,15,100]
* }
*
**/
public static PTuple7 concat(PTuple6 first, PTuple1 concatWith){
return new TupleImpl(Arrays.asList(),7){
public T1 v1(){
return first.v1();
}
public T2 v2(){
return first.v2();
}
public T3 v3(){
return first.v3();
}
public T4 v4(){
return first.v4();
}
public T5 v5(){
return first.v5();
}
public T6 v6(){
return first.v6();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),first.v2(),first.v3(),first.v4(),first.v5(),first.v6(),concatWith.v1());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10,11,12,13,14,15),(PowerTuples.tuple(100,101));
* // [10,11,12,13,14,15,100,101]
* }
*
**/
public static PTuple8 concat(PTuple6 first, PTuple2 concatWith){
return new TupleImpl(Arrays.asList(),8){
public T1 v1(){
return first.v1();
}
public T2 v2(){
return first.v2();
}
public T3 v3(){
return first.v3();
}
public T4 v4(){
return first.v4();
}
public T5 v5(){
return first.v5();
}
public T6 v6(){
return first.v6();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),first.v2(),first.v3(),first.v4(),first.v5(),first.v6(),concatWith.v1(),concatWith.v2());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
/**
* Concatenate two PTuples creating a new PTuple.
*
* {@code
* concat(PowerTuples.tuple(10,11,12,13,14,15,16),(PowerTuples.tuple(100));
* // [10,11,12,13,14,15,16,100]
* }
*
**/
public static PTuple8 concat(PTuple7 first, PTuple1 concatWith){
return new TupleImpl(Arrays.asList(),8){
public T1 v1(){
return first.v1();
}
public T2 v2(){
return first.v2();
}
public T3 v3(){
return first.v3();
}
public T4 v4(){
return first.v4();
}
public T5 v5(){
return first.v5();
}
public T6 v6(){
return first.v6();
}
public T7 v7(){
return first.v7();
}
@Override
public List getCachedValues() {
return Arrays.asList(first.v1(),first.v2(),first.v3(),first.v4(),first.v5(),first.v6(),first.v7(),concatWith.v1());
}
@Override
public Iterator iterator() {
return getCachedValues().iterator();
}
};
}
}