Sets the label text @throws IllegalArgumentException if name is null or the empty string.
(String name)
| 48 | * @throws IllegalArgumentException if name is {@code null} or the empty string. |
| 49 | */ |
| 50 | public void setName(String name) { |
| 51 | name = name == null ? null : name.trim(); |
| 52 | if (name == null || "".equals(name)) |
| 53 | throw new IllegalArgumentException("invalid label name"); |
| 54 | this.name = name; |
| 55 | } |
| 56 | |
| 57 | @Override |
| 58 | public String toSource(int depth) { |
no test coverage detected