Removes the key and associated value from the attributes. @since 1.22.0 @param key The key to remove @return this
(Key<T> key)
| 247 | * @return this |
| 248 | */ |
| 249 | public <T> Builder discard(Key<T> key) { |
| 250 | if (base != null) { |
| 251 | if (base.data.containsKey(key)) { |
| 252 | data(0).remove(key); |
| 253 | } |
| 254 | } else { |
| 255 | newdata.remove(key); |
| 256 | } |
| 257 | return this; |
| 258 | } |
| 259 | |
| 260 | public Builder setAll(Attributes other) { |
| 261 | data(other.data.size()).putAll(other.data); |