Пример #1
0
 /**
  * Increase the capacity of this <code>java.util.ArrayList<Object></code> instance, if
  * necessary, to ensure that it can hold at least the number of elements
  * specified by the minimum capacity argument.
  *
  * @param capacity The new minimum capacity
  */
 public override void ensureCapacity(int capacity)
 {
     if (fast)
     {
         lock (this)
         {
             java.util.ArrayList <Object> temp = (java.util.ArrayList <Object>)list.clone();
             temp.ensureCapacity(capacity);
             list = temp;
         }
     }
     else
     {
         lock (list)
         {
             list.ensureCapacity(capacity);
         }
     }
 }