base/common/src/main/com/thesett/common/util/doublemaps/SymbolTableImpl.java
public boolean containsKey(K primaryKey, L secondaryKey)
    {
        // Check that the field exists in the table.
        CircularArrayMap<E> field = fieldMap.get(secondaryKey);

        if (field == null)
        {
            return false;
        }

        // Check that the symbol exists in the table.
        CompositeKey<K> compositeKey = new CompositeKey<K>(parentSequenceKey, primaryKey);
        SymbolTableImpl<K, L, E> nextParentScope = parentScope;

        while (true)
        {
            if (hashFunction.containsKey(compositeKey))
            {
                break;
            }

            if (nextParentScope != null)
            {
                compositeKey = new CompositeKey(nextParentScope.parentSequenceKey, primaryKey);
                nextParentScope = nextParentScope.parentScope;
            }
            else
            {
                return false;
            }
        }

        // Calculate the symbols index in the table, and use it to check if a value for that field exists.
        E value = field.get(hashFunction.apply(compositeKey));

        return value != null;
    }
public boolean containsKey(K primaryKey, L secondaryKey)
    {
        // Check that the field exists in the table.
        CircularArrayMap<E> field = fieldMap.get(secondaryKey);

        if (field == null)
        {
            return false;
        }

        // Check that the symbol exists in the table.
        CompositeKey<K> compositeKey = new CompositeKey<K>(parentSequenceKey, primaryKey);
        SymbolTableImpl<K, L, E> nextParentScope = parentScope;

        while (true)
        {
            if (hashFunction.containsKey(compositeKey))
            {
                break;
            }

            if (nextParentScope != null)
            {
                compositeKey = new CompositeKey(nextParentScope.parentSequenceKey, primaryKey);
                nextParentScope = nextParentScope.parentScope;
            }
            else
            {
                return false;
            }
        }

        // Calculate the symbols index in the table, and use it to check if a value for that field exists.
        E value = field.get(hashFunction.apply(compositeKey));

        return value != null;
    }
{@inheritDoc}