Axiom.SceneManagers.Bsp.Collections.Map.Insert C# (CSharp) Method

Insert() public method

Inserts a value into a bucket that is specified by the key.
public Insert ( object key, object val ) : void
key object
val object
return void
        public void Insert( object key, object val )
        {
            ArrayList container = null;

            if ( buckets[ key ] == null )
            {
                container = new ArrayList();
                buckets.Add( key, container );
            }
            else
            {
                container = (ArrayList)buckets[ key ];
            }

            // TODO: Doing the contains check is extremely slow, so for now duplicate items are allowed
            //if(!container.Contains(val)) {
            container.Add( val );
            count++;
            //}
        }