Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
clausnagel committed Jul 2, 2024
1 parent c3202bb commit 5dd440d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ public class TextureImageProperty implements InlineOrByReferenceProperty<Externa
private Reference reference;

private TextureImageProperty(ExternalFile textureImage) {
this.textureImage = Objects.requireNonNull(textureImage, "The texture image must not be null.");;
this.textureImage = Objects.requireNonNull(textureImage, "The texture image must not be null.");
reference = null;
}

private TextureImageProperty(Reference reference) {
this.reference = Objects.requireNonNull(reference, "The reference must not be null.");;
this.reference = Objects.requireNonNull(reference, "The reference must not be null.");
textureImage = null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ public void putAll(PropertyMap<T> elements) {
}
}

public boolean remove(T element) {
return elements.getOrDefault(element.getName().getNamespace(), Collections.emptyMap())
.getOrDefault(element.getName().getLocalName(), Collections.emptyList())
.remove(element);
}

public List<T> remove(Name name) {
return elements.getOrDefault(name.getNamespace(), Collections.emptyMap())
.remove(name.getLocalName());
Expand Down

0 comments on commit 5dd440d

Please sign in to comment.