Exemple #1
0
 @Override
 public T map(Iterable<TupleN> input) {
   Collection[] collections = new Collection[ptypes.length];
   for (int i = 0; i < ptypes.length; i++) {
     collections[i] = Lists.newArrayList();
   }
   for (TupleN t : input) {
     for (int i = 0; i < ptypes.length; i++) {
       if (t.get(i) != null) {
         collections[i].add(ptypes[i].getDetachedValue(t.get(i)));
         break;
       }
     }
   }
   return (T) factory.makeTuple(collections);
 }
Exemple #2
0
 @Override
 public TupleN map(T input) {
   Object[] v = new Object[size];
   v[index] = input;
   return TupleN.of(v);
 }