コード例 #1
0
 public virtual void remove()
 {
     if (last == null)
     {
         throw new java.lang.IllegalStateException();
     }
     root.remove(last.getKey());
     last = null;
 }
コード例 #2
0
            public override bool remove(Object obj)
            {
                int hash = root.getHash(obj);

                lock (root.locks[hash])
                {
                    for (Node n = root.buckets[hash]; n != null; n = n.next)
                    {
                        Object k = n.getKey();
                        if ((k == obj) || ((k != null) && k.equals(obj)))
                        {
                            root.remove(k);
                            return(true);
                        }
                    }
                }
                return(false);
            }
コード例 #3
0
            public override bool remove(Object obj)
            {
                if (obj is java.util.MapNS.Entry <Object, Object> == false)
                {
                    return(false);
                }
                java.util.MapNS.Entry <Object, Object> entry = (java.util.MapNS.Entry <Object, Object>)obj;
                int hash = root.getHash(entry.getKey());

                lock (root.locks[hash])
                {
                    for (Node n = root.buckets[hash]; n != null; n = n.next)
                    {
                        if (n.equals(entry))
                        {
                            root.remove(n.getKey());
                            return(true);
                        }
                    }
                }
                return(false);
            }