code: public void setAttributeValue(String attributeName, CmsEntity value, int index) {
  
          if (m_simpleAttributes.containsKey(attributeName)) {
              throw new RuntimeException("Attribute already exists with a simple type value.");
          }
          if (!m_entityAttributes.containsKey(attributeName)) {
              if (index != 0) {
                  throw new IndexOutOfBoundsException();
              } else {
                  addAttributeValue(attributeName, value);
              }
          } else {
              if (m_entityAttributes.get(attributeName).size() > index) {
                  CmsEntity child = m_entityAttributes.get(attributeName).remove(index);
                  removeChildChangeHandler(child);
              }
              m_entityAttributes.get(attributeName).add(index, value);
              fireChange();
          }
      }
docs: Sets the given attribute value at the given index.<p>
  
  @param attributeName the attribute name
  @param value the attribute value
  @param index the value index