/** * @param hslaCssValue the hslaCssValue to set * @since 1.0.0 * @author WFF */ public void setHslaCssValue(final HslaCssValue hslaCssValue) { if (hslaCssValue == null) { throw new NullValueException("hslaCssValue can not be null"); } if (this.hslaCssValue != null) { if (hslaCssValue.isAlreadyInUse() && this.hslaCssValue.getStateChangeInformer() != hslaCssValue.getStateChangeInformer()) { try { final HslaCssValue hslaCssValueClone = CloneUtil.deepClone(hslaCssValue); this.hslaCssValue.setAlreadyInUse(false); this.hslaCssValue = hslaCssValueClone; if (LOGGER.isLoggable(Level.WARNING)) { LOGGER.warning( "cloned hslaCssValue " + hslaCssValue + "(hashcode: " + hslaCssValue.hashCode() + ") as it is already used by another object"); } } catch (final CloneNotSupportedException e) { throw new InvalidValueException(e.toString()); } } else { this.hslaCssValue.setAlreadyInUse(false); this.hslaCssValue = hslaCssValue; } } else { if (hslaCssValue.isAlreadyInUse()) { try { this.hslaCssValue = CloneUtil.deepClone(hslaCssValue); if (LOGGER.isLoggable(Level.WARNING)) { LOGGER.warning( "cloned hslaCssValue " + hslaCssValue + "(hashcode: " + hslaCssValue.hashCode() + ") as it is already used by another object"); } } catch (final CloneNotSupportedException e) { throw new InvalidValueException(e.toString()); } } else { this.hslaCssValue = hslaCssValue; } } cssValue = this.hslaCssValue.getValue(); this.hslaCssValue.setStateChangeInformer(this); this.hslaCssValue.setAlreadyInUse(true); makeRgbCssValueNull(); makeRgbaCssValueNull(); makeHslCssValueNull(); }