class ArrayFromTuple implements Extractor<Tuple, Object[]> {

	@Override
	public Object[] extract(Tuple in) {
		Object[] output;

		if (order == null) {
			// copy the whole tuple
			output = new Object[in.getArity()];
			for (int i = 0; i < in.getArity(); i++) {
				output[i] = in.getField(i);
			}
		} else {
			// copy user specified order
			output = new Object[order.length];
			for (int i = 0; i < order.length; i++) {
				output[i] = in.getField(order[i]);
			}
		}

		return output;
	}

	public  ArrayFromTuple();
	public  ArrayFromTuple(int... indexes);

}