RecordLayout (final byte recordSizeType) { return switch (recordSizeType) { case RECORD_SIZE_TYPE_SMALL -> ActualRecords.SmallRecord.INSTANCE; case RECORD_SIZE_TYPE_LARGE -> ActualRecords.LargeRecord.INSTANCE; default -> throw new IllegalArgumentException("recordSizeType(=" + recordSizeType + ") is unknown"); }; }