dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnetlib/Generics Generics.txt,1.5,1.6 Hashta


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/Generics Generics.txt,1.5,1.6 Hashtable.cs,1.6,1.7
Date: Tue, 25 Feb 2003 00:21:09 -0500

Update of /cvsroot/dotgnu-pnet/pnetlib/Generics
In directory subversions:/tmp/cvs-serv25064/Generics

Modified Files:
        Generics.txt Hashtable.cs 
Log Message:


Remove utility routines from Hashtable; make it sealed; fix "null" comparison
issues; implement the "Keys" and "Values" collections properly.


Index: Generics.txt
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/Generics/Generics.txt,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** Generics.txt        25 Feb 2003 04:45:18 -0000      1.5
--- Generics.txt        25 Feb 2003 05:21:06 -0000      1.6
***************
*** 24,29 ****
--- 24,31 ----
  Arg_ABMustBeComparable=a or b must implement IComparable<T>
  Arg_CannotReduceCapacity=Cannot reduce the capacity of an array list below 
its current length
+ Arg_ExistingEntry=There is already an existing entry with the specified key
  Arg_InvalidArrayIndex=Array index is invalid
  Arg_InvalidArrayRange=Array range is invalid
+ Arg_NotInDictionary=There is no entry with the specified key
  ArgRange_Array=Array position or length is out of range
  ArgRange_HashLoadFactor=Invalid hash table load factor

Index: Hashtable.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/Generics/Hashtable.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** Hashtable.cs        25 Feb 2003 01:43:47 -0000      1.6
--- Hashtable.cs        25 Feb 2003 05:21:06 -0000      1.7
***************
*** 28,32 ****
  using System;
  
! public class Hashtable<KeyT, ValueT> : IDictionary<KeyT, ValueT>, ICloneable
  {
        // Contents of a hash bucket.
--- 28,33 ----
  using System;
  
! public sealed class Hashtable<KeyT, ValueT>
!               : IDictionary<KeyT, ValueT>, ICapacity, ICloneable
[...1222 lines suppressed...]
!                                       table.table[posn].hasEntry = false;
!                                       --(table.num);
!                               }
!               public ValueT Current
!                               {
!                                       get
!                                       {
!                                               if(posn < 0 || posn >= 
table.capacity ||
!                                              !(table.table[posn].hasEntry))
!                                               {
!                                                       throw new 
InvalidOperationException
!                                                               
(S._("Invalid_BadIteratorPosition"));
!                                               }
!                                               return table.table[posn].value;
!                                       }
!                               }
! 
!       }; // class HashtableValueIterator<KeyT, ValueT>
  
  }; // class Hashtable<KeyT, ValueT>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]