ActiveIcon (@NotNull IconReplacer replacer) { Icon regular = replacer.replaceIcon(myRegular); ActiveIcon icon = new ActiveIcon(regular, myRegular == myInactive ? regular : replacer.replaceIcon(myInactive)); icon.myActive = myActive; return icon; }