{
      int currentIndex = indexOf(object);
      if (currentIndex >= 0 && currentIndex != index)
      {
        throw new IllegalArgumentException("The 'no duplicates' constraint is violated");
      }
    }