Beispiel #1
0
 private PropListItem ensureProperty(int propType)
 {
     PropListItem item = lookupProperty (propType);
     if (item == null) {
         item = new PropListItem ();
         item.Type = propType;
         item.next = propListHead;
         propListHead = item;
     }
     return item;
 }
Beispiel #2
0
 public void removeProp(int propType)
 {
     PropListItem x = propListHead;
     if (x != null) {
         PropListItem prev = null;
         while (x.Type != propType) {
             prev = x;
             x = x.next;
             if (x == null) {
                 return;
             }
         }
         if (prev == null) {
             propListHead = x.next;
         }
         else {
             prev.next = x.next;
         }
     }
 }