Code example for SetMultimap

Methods: put

0
	public static void banConnection(Class<? extends Pipe>... types) {
		if (types.length == 0) {
			return; 
		} 
		if (types.length == 1) {
			connectionBans.put(types[0], types[0]);
			return; 
		} 
		for (int i = 0; i < types.length; i++) {
			for (int j = 0; j < types.length; j++) {
				if (i == j) {
					continue; 
				} 
				connectionBans.put(types[i], types[j]);
			} 
		} 
	} 
 
	public static boolean canPipesConnect(Class<? extends Pipe> type1, Class<? extends Pipe> type2) {
		return !connectionBans.containsEntry(type1, type2);
	}