Check the container for the SARL capacities.

@param capacity the capacity.
772519
@Check
	public void checkContainerType(SarlCapacity capacity) {
		final XtendTypeDeclaration declaringType = capacity.getDeclaringType();
		if (declaringType != null) {
			final String name = canonicalName(declaringType);
			assert name != null;
			error(MessageFormat.format(Messages.SARLValidator_30, name),
					capacity,
					null,
					INVALID_NESTED_DEFINITION);
		}
	}
46229
public void setStorage(java.util.Collection<ValidStorageOptions> storage) {
        if (storage == null) {
            this.storage = null;
            return;
        }

        this.storage = new java.util.ArrayList<ValidStorageOptions>(storage);
    }
1308939
@Check(CheckType.FAST)
	public void checkCapacityTypeForUses(SarlCapacityUses uses) {
		for (final JvmParameterizedTypeReference usedType : uses.getCapacities()) {
			final LightweightTypeReference ref = toLightweightTypeReference(usedType);
			if (ref != null && !this.inheritanceHelper.isSarlCapacity(ref)) {
				error(MessageFormat.format(
						Messages.SARLValidator_57,
						usedType.getQualifiedName(),
						Messages.SARLValidator_58,
						this.grammarAccess.getUsesKeyword()),
						usedType,
						null,
						ValidationMessageAcceptor.INSIGNIFICANT_INDEX,
						INVALID_CAPACITY_TYPE,
						usedType.getSimpleName());
			}
		}
	}
786638
public void ensureCapacity (int additionalCapacity) {
		int newCapacity = size + additionalCapacity;
		if (items.length < newCapacity) resize(newCapacity);
	}
960598
@Override
  public void onContainersAllocated(final List<Container> allocatedContainers) {

    String id = null; // ID is used for logging only

    if (LOG.isLoggable(Level.FINE)) {

      id = String.format("%s:%d", Thread.currentThread().getName().replace(' ', '_'), System.currentTimeMillis());

      LOG.log(Level.FINE, "TIME: Allocated Containers {0} {1} of {2}",
          new Object[] {id, allocatedContainers.size(), this.containerRequestCounter.get()});
    }

    for (final Container container : allocatedContainers) {
      this.handleNewContainer(container);
    }

    LOG.log(Level.FINE, "TIME: Processed Containers {0}", id);
  }
321592
void initialCapacity(String key, @Nullable String value) {
    requireArgument(initialCapacity == UNSET_INT,
        "initial capacity was already set to %,d", initialCapacity);
    initialCapacity = parseInt(key, value);
  }
1294532
public void compact()
    {
        final int idealCapacity = (int)Math.round(size() * (1.0 / loadFactor));
        rehash(findNextPositivePowerOfTwo(Math.max(MIN_CAPACITY, idealCapacity)));
    }
474398
public static void checkCapacity(final int capacity)
    {
        if (!BitUtil.isPowerOfTwo(capacity))
        {
            final String msg = "capacity must be a positive power of 2 + TRAILER_LENGTH: capacity=" + capacity;
            throw new IllegalStateException(msg);
        }
    }
949575
protected void validateResourceState(Resource resource) {
		if (resource instanceof StorageAwareResource && ((StorageAwareResource) resource).isLoadedFromStorage()) {
			LOG.error("Discouraged attempt to compute types for resource that was loaded from storage. Resource was : "+resource.getURI(), new Exception());
		}
	}
831697
public static <F> FullList<F> newListWithCapacity(final int capacity, final F... elements) {
		final FullList<F> l = new FullList<F>(null, capacity);
		l.addAll(Arrays.asList(elements));
		return l;
	}
928602
public final void ensureCapacity(int minCapacity) {
    if (minCapacity < 0) {
      throw new IndexOutOfBoundsException();
    }
    Object[] data = this.data;
    int minDataCapacity = minCapacity << 1;
    int oldDataCapacity = data == null ? 0 : data.length;
    if (minDataCapacity > oldDataCapacity) {
      int newDataCapacity = oldDataCapacity / 2 * 3 + 1;
      if (newDataCapacity % 2 != 0) {
        newDataCapacity++;
      }
      if (newDataCapacity < minDataCapacity) {
        newDataCapacity = minDataCapacity;
      }
      setDataCapacity(newDataCapacity);
    }
  }
573041
protected static int getBucketCount (int capacity, float loadFactor)
    {
        int size = (int)(capacity / loadFactor);
        int highest = Integer.highestOneBit(size);
        return Math.max((size == highest) ? highest : (highest << 1), MIN_BUCKET_COUNT);
    }
1010637
public void setCapacity(String queue,float capacity) {
    rmConf.setFloat(toFullPropertyName(queue, CAPACITY_PROPERTY),capacity);
  }
1341845
@Check(CheckType.FAST)
	public void checkCapacityFeatures(SarlCapacity capacity) {
		if (capacity.getMembers().isEmpty()) {
			if (!isIgnored(DISCOURAGED_CAPACITY_DEFINITION)) {
				addIssue(Messages.SARLValidator_77,
						capacity,
						null,
						ValidationMessageAcceptor.INSIGNIFICANT_INDEX,
						DISCOURAGED_CAPACITY_DEFINITION,
						capacity.getName(),
						"aFunction"); //$NON-NLS-1$
			}
		}
	}
447797
boolean ensureInputCapacity(int capacity) {
        return signature.successors.ensureCapacity(capacity) | signature.outputs.ensureCapacity(capacity);
    }
1195859
public synchronized void beginSampling(int capacity)
    {
        if (!enabled)
        {
            summary = new StreamSummary<T>(capacity);
            hll = new HyperLogLogPlus(14);
            enabled = true;
        }
    }
909394
protected final void checkResize() {
        if (size == table.length) { // size / table.length > DENSITY
            int forSize = table.length + 1; // size + 1;
            for (int i=0, newCapacity = MIN_CAPA; i < PRIMES.length; i++, newCapacity <<= 1) {
                if (newCapacity > forSize) {
                    resize(PRIMES[i]);
                    return;
                }
            }
            return;
        }
    }