Code example for CopyOnWriteArrayList

Methods: add

0
		return instanceShouldLog(prio, o == null ? null : o.getClass());
	} 
 
	@Override 
	public final void instanceRegisterLogThresholdCallback(LogThresholdCallback ltc) {
		thresholdsCallbacks.add(ltc);
 
		// Call the new callback to avoid code duplication 
		ltc.shouldUpdate();
	} 
	 
	@Override 
	public final void instanceUnregisterLogThresholdCallback(LogThresholdCallback ltc) {
		thresholdsCallbacks.remove(ltc);
	} 
 
	private void notifyLogThresholdCallbacks() { 
		for(LogThresholdCallback ltc : thresholdsCallbacks)
			ltc.shouldUpdate();
	}