public static final TypeConfig<SopremoRecord> getTypeConfig(SopremoRecordLayout layout) {

    final TypeConfig<SopremoRecord> typeConfig;
    final TypeStringifier<SopremoRecord> typeStringifier = DefaultStringifier.get();
    final Equaler<SopremoRecord> equaler = DefaultEqualer.get();
    final int[] keys = new int[layout.getNumKeys()];
    for (int index = 0; index < keys.length; index++) keys[index] = index;
    final boolean[] ascending = new boolean[keys.length];
    Arrays.fill(ascending, true);
    typeConfig =
        new TypeConfig<SopremoRecord>(
            new SopremoRecordComparatorFactory(layout, keys, ascending),
            SopremoRecordPairComparatorFactory.get(),
            new SopremoRecordSerializerFactory(layout),
            typeStringifier,
            new SopremoKeyExtractor(
                layout.getKeyExpressions().toArray(new EvaluationExpression[0])),
            equaler);
    return typeConfig;
  }