class ResourceProfile implements Serializable {

	@Override
	public String toString() {
		if (this.equals(UNKNOWN)) {
			return "ResourceProfile{UNKNOWN}";
		}

		if (this.equals(ANY)) {
			return "ResourceProfile{ANY}";
		}

		final StringBuilder extendedResourceStr = new StringBuilder(extendedResources.size() * 10);
		for (Map.Entry<String, Resource> resource : extendedResources.entrySet()) {
			extendedResourceStr.append(", ").append(resource.getKey()).append('=').append(resource.getValue().getValue());
		}
		return "ResourceProfile{" + getResourceString() + extendedResourceStr + '}';
	}

	private  ResourceProfile(
			final Resource cpuCores,
			final MemorySize taskHeapMemory,
			final MemorySize taskOffHeapMemory,
			final MemorySize managedMemory,
			final MemorySize networkMemory,
			final Map<String, Resource> extendedResources);
	private  ResourceProfile();

}