Rhino.ObjToIntMap.Intern C# (CSharp) Method

Intern() public method

If table already contains a key that equals to keyArg, return that key while setting its value to zero, otherwise add keyArg with 0 value to the table and return it.
If table already contains a key that equals to keyArg, return that key while setting its value to zero, otherwise add keyArg with 0 value to the table and return it.
public Intern ( object keyArg ) : object
keyArg object
return object
		public virtual object Intern(object keyArg)
		{
			bool nullKey = false;
			if (keyArg == null)
			{
				nullKey = true;
				keyArg = UniqueTag.NULL_VALUE;
			}
			int index = EnsureIndex(keyArg);
			values[index] = 0;
			return (nullKey) ? null : keys[index];
		}