core/src/main/java/com/orientechnologies/orient/core/index/OCompositeKey.java
public void addKey(final Object key) {
    if (key instanceof OCompositeKey) {
      final OCompositeKey compositeKey = (OCompositeKey) key;
      for (final Object inKey : compositeKey.keys) {
        addKey(inKey);
      }
    } else {
      keys.add(key);
    }
  }
public void addKey(final Object key) {
    if (key instanceof OCompositeKey) {
      final OCompositeKey compositeKey = (OCompositeKey) key;
      for (final Object inKey : compositeKey.keys) {
        addKey(inKey);
      }
    } else {
      keys.add(key);
    }
  }
Add new key value to the list of already registered values.
<p>
If passed in value is {@link OCompositeKey} itself then its values will be copied in current index. But key itself will not be
added.

@param key Key to add.