/** * Substitutes the icon fields according to the spec. * * @param substituter * @return The substituted icon */ public Icon substitute(Substitutions substituter) { Icon icon = new Icon(this); icon.content = substituter.substituteString(Substitutions.Type.MESSAGE, content); return icon; }
/** * Creates an icon for substitute() * * @param icon */ private Icon(Icon icon) { mode = icon.mode; type = icon.type; }