Add an object into this <code>OrdinalMap</code>.  If the same object (or an {@link Object#equals(Object)} object) is
already in the map, then no changes will be made.

@return the ordinal of <code>obj</code>
348232
public int add(T obj) {
        int ordinal = get(obj);
        if(ordinal != -1)
            return ordinal;
        
        if(size == objectsByOrdinal.length)
            growCapacity();
        
        objectsByOrdinal[size] = obj;
        hashOrdinalIntoArray(size, hashedOrdinalArray);
        
        return size++;
    }
1349498
private ObjectResult addOrUpdateObject(DBObject                          dbObj,
                                           Map<String, String>               currScalarMap,
                                           Map<String, Map<String, Integer>> targObjShardNos)
            throws IOException {
        ObjectUpdater objUpdater = new ObjectUpdater(m_tableDef);
        if (targObjShardNos.size() > 0) {
            objUpdater.setTargetObjectShardNumbers(targObjShardNos);
        }
        if (currScalarMap == null || currScalarMap.size() == 0) {
            return objUpdater.addNewObject(m_parentTran, dbObj);
        } else {
            return objUpdater.updateObject(m_parentTran, dbObj, currScalarMap);
        }
    }
803740
public synchronized int add(E object) {
		if (object == null)
			throw new NullPointerException("FastList add called with null");

		if ((count + 1) >= maxCount)
			resize(capacity * 2);

		int initialAddIndex = addIndex;

		// find right spot to add to - start with addIndex and look
		// for first open spot. give up if we get back to initialAddIndex
		while (listElements[addIndex] != null) {
			addIndex++;
			if (addIndex == capacity)
				addIndex = 0;

			if (addIndex == initialAddIndex) {
				// should not happen - we should have resized if we needed more
				// capacity
				throw new RuntimeException("FastList out of space");
			}
		}

		count++;
		listElements[addIndex] = object;

		return addIndex;
	}
243146
public Object put(Object key, Object value)
	{
		synchronized(this)
		{
				//253010, Do not check size since we do so in WebContainer
				Object obj = super.put(key, value);
				if (obj==null)		//Object was added or value previously added was null
					size = super.size(); 	
				return obj;				
		}
	}
916580
public int compareTo(Object obj) {
		LdapRdn that = (LdapRdn) obj;

        if(this.components.size() != that.components.size()) {
            return this.components.size() - that.components.size();
        }

        Set<Map.Entry<String,LdapRdnComponent>> theseEntries = this.components.entrySet();
        for (Map.Entry<String, LdapRdnComponent> oneEntry : theseEntries) {
            LdapRdnComponent thatEntry = that.components.get(oneEntry.getKey());
            if(thatEntry == null) {
                return -1;
            }

            int compared = oneEntry.getValue().compareTo(thatEntry);
            if(compared != 0) {
                return compared;
            }
        }

		return 0;
	}
825957
@Override
  public LaxImmutableMapBuilder<K, V> orderEntriesByValue(Comparator<? super V> valueComparator) {
    this.immutableMapEntryOrdering = checkNotNull(valueComparator);
    return this;
  }
490786
public MapAssert<String, Object> isObject() {
        Node node = assertType(OBJECT);
        return new JsonMapAssert((Map<String, Object>) node.getValue(), path.asPrefix(), configuration)
            .as("Different value found in node \"%s\"", path);
    }
434731
@SuppressWarnings("unchecked")
  public static <K, V> ImmutableSortedMap<K, V> of() {
    return EmptyImmutableSortedMap.forComparator(NATURAL_ORDER);
  }
51666
public boolean add(Object obj) {
        if (obj == null) {
            obj = NULL;
        }

        Entry tab[] = mTable;
        int hash = hashCode(obj);
        int index = (hash & 0x7FFFFFFF) % tab.length;

        for (Entry e = tab[index], prev = null; e != null; e = e.mNext) {
            Object iobj = e.get();
            if (iobj == null) {
                // Clean up after a cleared Reference.
                if (prev != null) {
                    prev.mNext = e.mNext;
                }
                else {
                    tab[index] = e.mNext;
                }
                mCount--;
            }
            else if (e.mHash == hash &&
                     obj.getClass() == iobj.getClass() &&
                     equals(obj, iobj)) {
                // Already in set.
                return false;
            }
            else {
                prev = e;
            }
        }

        if (mCount >= mThreshold) {
            // Cleanup the table if the threshold is exceeded.
            cleanup();
        }

        if (mCount >= mThreshold) {
            // Rehash the table if the threshold is still exceeded.
            rehash();
            tab = mTable;
            index = (hash & 0x7FFFFFFF) % tab.length;
        }

        // Create a new entry.
        tab[index] = new Entry((obj == NULL ? new Null() : obj), hash, tab[index]);
        mCount++;
        return true;
    }
730972
@Inline(value="$2.$3copyOfSorted($1)", imported=ImmutableSortedMap.class)
	public static <K, V> SortedMap<K, V> immutableCopy(SortedMap<K, ? extends V> map) {
		return ImmutableSortedMap.copyOfSorted(map);
	}
152211
public boolean add(Object o) {
		if (o instanceof ListItem) {
			ListItem item = (ListItem) o;
			Chunk chunk = new Chunk(preSymbol, symbol.getFont());
			switch (type ) {
				case 0:
					chunk.append(String.valueOf((char)(first + list.size() + 171)));
					break;
				case 1:
					chunk.append(String.valueOf((char)(first + list.size() + 181)));
					break;
				case 2:
					chunk.append(String.valueOf((char)(first + list.size() + 191)));
					break;
				default:
					chunk.append(String.valueOf((char)(first + list.size() + 201)));
			}
			chunk.append(postSymbol);
			item.setListSymbol(chunk);
			item.setIndentationLeft(symbolIndent, autoindent);
			item.setIndentationRight(0);
			list.add(item);
		} else if (o instanceof List) {
			List nested = (List) o;
			nested.setIndentationLeft(nested.getIndentationLeft() + symbolIndent);
			first--;
			return list.add(nested);
		} else if (o instanceof String) {
			return this.add(new ListItem((String) o));
		}
		return false;
	}
286563
public int compareTo(Object o)
   {
      MBeanData md = (MBeanData) o;
      String d1 = objectName.getDomain();
      String d2 = md.objectName.getDomain();
      int compare = d1.compareTo(d2);
      if (compare == 0)
      {
         String p1 = objectName.getCanonicalKeyPropertyListString();
         String p2 = md.objectName.getCanonicalKeyPropertyListString();
         compare = p1.compareTo(p2);
      }
      return compare;
   }
425390
public boolean addRef(Object object)
        throws IOException
    {
        if (_refs == null)
            _refs = new IdentityHashMap();

        Integer ref = (Integer) _refs.get(object);

        if (ref != null) {
            int value = ref.intValue();

            writeRef(value);
            return true;
        }
        else {
            _refs.put(object, new Integer(_refs.size()));

            return false;
        }
    }
945485
public boolean add(Object o) {
		if (o instanceof ListItem) {
			ListItem item = (ListItem) o;
			Chunk chunk = new Chunk(preSymbol, symbol.getFont());
			chunk.append(String.valueOf((char)zn));
			chunk.append(postSymbol);
			item.setListSymbol(chunk);
			item.setIndentationLeft(symbolIndent, autoindent);
			item.setIndentationRight(0);
			list.add(item);
		} else if (o instanceof List) {
			List nested = (List) o;
			nested.setIndentationLeft(nested.getIndentationLeft() + symbolIndent);
			first--;
			return list.add(nested);
		} else if (o instanceof String) {
			return this.add(new ListItem((String) o));
		}
		return false;
	}
1325200
public boolean extend(SpatialComparable obj) {
    final int dim = min.length;
    assert (obj.getDimensionality() == dim);
    boolean extended = false;
    for(int i = 0; i < dim; i++) {
      final double omin = obj.getMin(i);
      final double omax = obj.getMax(i);
      if(omin < min[i]) {
        min[i] = omin;
        extended = true;
      }
      if(omax > max[i]) {
        max[i] = omax;
        extended = true;
      }
    }
    return extended;
  }
244561
public WeightRandom<T> add(WeightObj<T> weightObj) {
		if(null != weightObj) {
			final double weight = weightObj.getWeight();
			if(weightObj.getWeight() > 0) {
				double lastWeight = (this.weightMap.size() == 0) ? 0 : this.weightMap.lastKey();
				this.weightMap.put(weight + lastWeight, weightObj.getObj());// 权重累加
			}
		}
		return this;
	}
591381
private boolean updateExistingObject(DBObject dbObj, Map<String, String> currScalarMap) {
        if (objectIsChangingShards(dbObj, currScalarMap)) {
            return updateShardedObjectMove(dbObj);
        } else {
            return updateObjectSameShard(dbObj, currScalarMap);
        }
    }