[ https://issues.apache.org/jira/browse/CALCITE-5706?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julian Hyde updated CALCITE-5706: --------------------------------- Description: Add a {{class PairList}} which is an implementation of {{List<Map.Entry<K, V>}} backed by a single list. Each entry to the {{PairList}} corresponds to two entries in the backing list, but we save ourselves the effort of creating {{Map.Entry}} wrappers. A {{PairList}} can be used to build two lists in parallel (e.g. a list of field types and field names that will be converted to a struct type); it can also be used to build maps. It has a {{forEach(BiConsumer<K, V>)}} method to allow the list to be deconstructed without creating intermediate entries. Potentially also {{toImmutableMap}} and {{toHashMap}} methods. was: Add a {{class PairList}} which an implementation of {{List<Map.Entry<K, V>}} backed by a single list. It can be used to build two lists in parallel (e.g. a list of field types and field names that will be converted to a struct type); it can also be used to build maps. It has a {{forEach(BiConsumer<K, V>)}} method to allow the list to be deconstructed without creating intermediate entries. Potentially also {{toImmutableMap}} and {{toHashMap}} methods. > Add class PairList > ------------------ > > Key: CALCITE-5706 > URL: https://issues.apache.org/jira/browse/CALCITE-5706 > Project: Calcite > Issue Type: Bug > Reporter: Julian Hyde > Assignee: Julian Hyde > Priority: Major > > Add a {{class PairList}} which is an implementation of {{List<Map.Entry<K, > V>}} backed by a single list. Each entry to the {{PairList}} corresponds to > two entries in the backing list, but we save ourselves the effort of creating > {{Map.Entry}} wrappers. > A {{PairList}} can be used to build two lists in parallel (e.g. a list of > field types and field names that will be converted to a struct type); it can > also be used to build maps. > It has a {{forEach(BiConsumer<K, V>)}} method to allow the list to be > deconstructed without creating intermediate entries. > Potentially also {{toImmutableMap}} and {{toHashMap}} methods. -- This message was sent by Atlassian Jira (v8.20.10#820010)