Needed this for debug purpose -- translates the doubly linked list into an array list.

@return an array list (sorted by priority) of elements (live copy).
501452
public ArrayList<RepairDigramRecord> toList() {
    ArrayList<RepairDigramRecord> res = new ArrayList<RepairDigramRecord>(this.elements.size());
    RepairQueueNode cp = this.head;
    while (null != cp) {
      res.add(cp.payload);
      cp = cp.next;
    }
    return res;
  }
1070622
public Object[] toArray() {
    Iterator<E> iter = iterator();
    ArrayList<Object> al = new ArrayList<Object>();
    while (iter.hasNext()) {
      al.add(iter.next());
    }
    return al.toArray();
  }
658574
public List<Attribute> asList() {
        ArrayList<Attribute> list = new ArrayList<>(size);
        for (int i = 0; i < size; i++) {
            Attribute attr = vals[i] == null ?
                new BooleanAttribute(keys[i]) : // deprecated class, but maybe someone still wants it
                new Attribute(keys[i], vals[i], Attributes.this);
            list.add(attr);
        }
        return Collections.unmodifiableList(list);
    }
1271658
public List<String> asList() {
		return Lists.newLinkedList(Splitter.on(separator.toString()).split(gets()));
	}
656013
public HashMap<String, IndexInput> getIndexInputList() {
    HashMap<String, IndexInput> clonedIndexInputList = new HashMap<String, IndexInput>();
    for (Entry<String, IndexInput> entry : indexInputList.entrySet()) {
      clonedIndexInputList.put(entry.getKey(), entry.getValue().clone());
    }
    return clonedIndexInputList;
  }
557774
public float[] toFloatArray() {
    float[] copy = new float[size];
    for (int i = 0; i < size; i++) {
      copy[i] = elements[i];
    }
    return copy;
  }
664069
public List<T> nextPermutationAsList()
    {
        List<T> permutation = new ArrayList<T>(elements.length);
        return nextPermutationAsList(permutation);
    }
199660
@Override
   public Object[] toArray() {
      // Estimate size of array; be prepared to see more or fewer elements
      Object[] r = new Object[size()];
      try (CloseableIterator<O> it = iterator()) {
         for (int i = 0; i < r.length; i++) {
            if (! it.hasNext()) // fewer elements than expected
               return Arrays.copyOf(r, i);
            r[i] = it.next();
         }
         return it.hasNext() ? finishToArray(r, it) : r;
      }
   }
1016184
public List<T> getAll() {
		List<T> result = new ArrayList<T>();
		if (nodes != null)
			for(Node element : nodes) 
				result.add(getCachedOrNewRepresentation(element));
		return result;
	}
	
	public int size() {
		return nodes.size();
	}
	
	public T get(int index) {
		return getCachedOrNewRepresentation(nodes.get(index));
	}
		
	public Iterator<T> iterator() {
		return getAll().iterator();
	}
}
1063360
public List<MaterialSection> getSectionList() {
        List<MaterialSection> list = new LinkedList<>();

        for(MaterialSection section : sectionList)
            list.add(section);

        for(MaterialSection section : bottomSectionList)
            list.add(section);

        return list;
    }
914168
public AbstractInsnNode[] toArray() {
        int i = 0;
        AbstractInsnNode elem = first;
        AbstractInsnNode[] insns = new AbstractInsnNode[size];
        while (elem != null) {
            insns[i] = elem;
            elem.index = i++;
            elem = elem.next;
        }
        return insns;
    }
512129
public String[] list()
    {
        String[] list =_file.list();
        if (list==null)
            return null;
        for (int i=list.length;i-->0;)
        {
            if (new File(_file,list[i]).isDirectory() &&
                !list[i].endsWith("/"))
                list[i]+="/";
        }
        return list;
    }
940430
public int[] toIntegerArray() {
    int[] copy = new int[size];
    for (int i = 0; i < size; i++) {
      copy[i] = elements[i];
    }
    return copy;
  }
292651
@Nonnull
  @ReturnsMutableCopy
  public ICommonsList <DATATYPE> next ()
  {
    if (!hasNext ())
      throw new NoSuchElementException ();

    // Not for the very first item, as the first item is the original order
    final boolean bFirstItem = m_bUseLong ? m_nCombinationsLeft == m_nTotalCombinations
                                          : m_aCombinationsLeft.equals (m_aTotalCombinations);
    if (!bFirstItem)
    {
      final int nElementCount = m_aElements.length;
      final int nSlotCount = m_aIndexResult.length;

      int i = nSlotCount - 1;
      while (m_aIndexResult[i] == (nElementCount - nSlotCount + i))
      {
        i--;
      }
      m_aIndexResult[i]++;
      final int nIndexResultI = m_aIndexResult[i];
      for (int j = i + 1; j < nSlotCount; j++)
      {
        m_aIndexResult[j] = nIndexResultI + j - i;
      }
    }

    // One combination less
    if (m_bUseLong)
      m_nCombinationsLeft--;
    else
      m_aCombinationsLeft = m_aCombinationsLeft.subtract (BigInteger.ONE);

    // Build result list
    final ICommonsList <DATATYPE> aResult = new CommonsArrayList <> (m_aIndexResult.length);
    for (final int nIndex : m_aIndexResult)
      aResult.add (m_aElements[nIndex]);
    return aResult;
  }
1109687
public List<LocaleEncodingMappingListType<WebFragmentType<T>>> getAllLocaleEncodingMappingList()
   {
      List<LocaleEncodingMappingListType<WebFragmentType<T>>> list = new ArrayList<LocaleEncodingMappingListType<WebFragmentType<T>>>();
      List<Node> nodeList = childNode.get("locale-encoding-mapping-list");
      for(Node node: nodeList)
      {
         LocaleEncodingMappingListType<WebFragmentType<T>>  type = new LocaleEncodingMappingListTypeImpl<WebFragmentType<T>>(this, "locale-encoding-mapping-list", childNode, node);
         list.add(type);
      }
      return list;
   }
429188
public List iterateObjectsToList() {
        List result = new ArrayList();
        Iterator iterator = iterateObjects();
        for (; iterator.hasNext(); ) {
            result.add(iterator.next());
        }
        return result;
    }
325253
public List<E> toList()
    {
        ArrayList<E> list = new ArrayList<E>(queue.size());
        while (!queue.isEmpty())
        {
            list.add(0, queue.poll());
        }

        return list;
    }