Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-5706

Add class PairList

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.35.0
    • None

    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.

      Attachments

        Activity

          People

            julianhyde Julian Hyde
            julianhyde Julian Hyde
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: