Allows the text value for the title element be replaced. {@inheritDoc}
(final String message)
| 51 | * {@inheritDoc} |
| 52 | */ |
| 53 | @Override |
| 54 | public void setNodeValue(final String message) { |
| 55 | final DomNode child = getFirstChild(); |
| 56 | if (child == null) { |
| 57 | final DomNode textNode = new DomText(getPage(), message); |
| 58 | appendChild(textNode); |
| 59 | } |
| 60 | else if (child instanceof DomText text) { |
| 61 | text.setData(message); |
| 62 | } |
| 63 | else { |
| 64 | throw new IllegalStateException("For title tag, this should be a text node"); |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | /** |
| 69 | * {@inheritDoc} |
no test coverage detected