code: @Override
    public boolean add(E o) {
      Integer index = indexes.get(o);
      if (index == null && ! locked) {
        index = objects.size();
        objects.add(o);
        indexes.put(o, index);
        return true;
      }
      return false;
    }
docs: Adds an object to the Index. If it was already in the Index,
  then nothing is done.  If it is not in the Index, then it is
  added iff the Index hasn't been locked.
  
  @return true if the item was added to the index and false if the
  item was already in the index or if the index is locked