Skip to content

Commit

Permalink
Add containsKey and containsValue to PDNumberTreeNode
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximPlusov committed Jun 10, 2024
1 parent 623cf08 commit 49e7f8a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/main/java/org/verapdf/pd/structure/PDNumberTreeNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,17 @@ public Long size() {
}
return i;
}

public boolean containsKey(Long key) {
return getObject(key) != null;
}

public boolean containsValue(COSObject value) {
for (COSObject object : this) {
if (object != null && object.equals(value)) {
return true;
}
}
return false;
}
}

0 comments on commit 49e7f8a

Please sign in to comment.