Пример #1
0
 public void SetBuckets(System.Collections.DictionaryEntry[] buckets) {
     if (buckets != null) {
         m_buckets = buckets;
     } else {
         m_buckets = new System.Collections.DictionaryEntry[0];
     }
     CheckCapacity();
 }
Пример #2
0
 public override void Deserialise(Corba.DataInputStream source) {
     // skip rmi data
     source.read_octet();
     source.read_octet();
     // load factor
     m_loadFactor = source.read_float();
     // treshhold, ignore (calculated)
     source.read_long();
     // capacity
     m_capacity = source.read_long();
     // size
     int size = source.read_long();
     // buckets
     m_buckets = new System.Collections.DictionaryEntry[size];
     for (int i = 0; i < size; i++) {                
         object key = ReadObject(source);
         object val = ReadObject(source);
         m_buckets[i] = new System.Collections.DictionaryEntry(key, val);
     }            
 }
Пример #3
0
 public HashMapImpl() {
     m_loadFactor = 0.75f;
     m_capacity = 16; // for websphere 5, capacity 0 is not allowed!
     m_buckets = new System.Collections.DictionaryEntry[0];          
 }