Iterator<K> () { return new MyIterator<K>() { @Override K fieldElement(int offset) { return offset == 0 ? k1 : offset == 1 ? k2 : k3; } @SuppressWarnings("unchecked") @Override K tableElement(int offset) { return (K)data[offset]; } }; }