base/common/src/main/com/thesett/common/util/maps/CircularArrayMap.java
public V remove(Object objectKey)
    {
        int key = (Integer) objectKey;

        if (keyInRange(key))
        {
            // Check if the key is the first element in the list, and walk forward to find the next non-empty element
            // in order to advance the start to.
            if (key == start)
            {
                int newStart = start + 1;

                while ((data[offset(newStart)] == null) && (newStart <= end))
                {
                    newStart++;
                }

                start = newStart;
            }

            int offset = offset(key);
            V result = (V) data[offset];
            data[offset] = null;

            // Decrement the count only if a value was removed.
            if (result != null)
            {
                count--;
            }

            return result;
        }

        return null;
    }
public V remove(Object objectKey)
    {
        int key = (Integer) objectKey;

        if (keyInRange(key))
        {
            // Check if the key is the first element in the list, and walk forward to find the next non-empty element
            // in order to advance the start to.
            if (key == start)
            {
                int newStart = start + 1;

                while ((data[offset(newStart)] == null) && (newStart <= end))
                {
                    newStart++;
                }

                start = newStart;
            }

            int offset = offset(key);
            V result = (V) data[offset];
            data[offset] = null;

            // Decrement the count only if a value was removed.
            if (result != null)
            {
                count--;
            }

            return result;
        }

        return null;
    }
{@inheritDoc}