Code example for ConcurrentMap

Methods: putAll

0
	public BiomeMaterialColor(Map<Biome, MaterialColor> colors) { 
		this(colors, null); 
	} 
	 
	public BiomeMaterialColor(Map<Biome, MaterialColor> colors, MaterialColor fallback) { 
		this.colors.putAll(colors); 
		this.fallback = fallback; 
	} 
	 
	@Override 
	public Color getColor(int data, int x, int z, double rainfall, double temperature, Biome biome) { 
		MaterialColor color = colors.get(biome); 
		if (color == null) { 
			if (fallback == null) { 
				return null; 
			} 
			color = fallback; 
		} 
		return color.getColor(data, x, z, rainfall, temperature, biome); 
	}