@Override
    public int index(E element)
    {
        if (first == null)
        {
            return -1;
        }
        int index = 0;
        for (Node<E> node = first; node != null; node = node.next)
        {
            if (node.element == null || element == null)
            {
                if (node.element == element)
                {
                    return index;
                }
            }
            else if (node.element.equals(element))
            {
                return index;
            }
            ++index;
        }
        return -1;
    }