docs: private void addCollectionEdges(Vertex vertex, CollectionDescriptor cds)
      {
          ObjectEnvelope envelope = vertex.getEnvelope();
          Object col = cds.getPersistentField().get(envelope.getRealObject());
          Object[] refObjects;
          if (col == null || (ProxyHelper.isCollectionProxy(col) && !ProxyHelper.getCollectionProxy(col).isLoaded()))
          {
              refObjects = EMPTY_OBJECT_ARRAY;
          }
          else
          {
              refObjects = BrokerHelper.getCollectionArray(col);
          }
          Class refClass = cds.getItemClass();
  
          for (int i = 0; i < vertices.length; i++)
          {
              Edge edge = null;
              Vertex refVertex = vertices[i];
              ObjectEnvelope refEnvelope = refVertex.getEnvelope();
  
              if (refClass.isInstance(refEnvelope.getRealObject()))
              {
                  if (containsObject(refEnvelope.getRealObject(), refObjects))
                  {
                      if (cds.isMtoNRelation())
                      {
                          edge = buildConcreteMNEdge(vertex, refVertex);
                      }
                      else
                      {
                          edge = buildConcrete1NEdge(vertex, refVertex);
                      }
                  }
                  else
                  {
                      if (cds.isMtoNRelation())
                      {
                          edge = buildPotentialMNEdge(vertex, refVertex);
                      }
                      else
                      {
                          edge = buildPotential1NEdge(vertex, refVertex);
                      }
                  }
              }
              if (edge != null)
              {
                  if (!edgeList.contains(edge))
                  {
                      edgeList.add(edge);
                  }
                  else
                  {
                      edge.increaseWeightTo(edge.getWeight());
                  }
              }
          }
      }