aboutsummaryrefslogtreecommitdiffstats
path: root/poi-ooxml
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2021-12-30 01:25:20 +0000
committerPJ Fanning <fanningpj@apache.org>2021-12-30 01:25:20 +0000
commit6d93ac6172ae38a865eff8949e2a9772bf3cd2e9 (patch)
treef0d70f8f42bb3f047df436f389a4877195beca09 /poi-ooxml
parent9021c449f02b46672277e575885b9cae50ac36f0 (diff)
downloadpoi-6d93ac6172ae38a865eff8949e2a9772bf3cd2e9.tar.gz
poi-6d93ac6172ae38a865eff8949e2a9772bf3cd2e9.zip
add isEmpty() method
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1896521 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-ooxml')
-rw-r--r--poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java
index b529a493a1..bece2c742e 100644
--- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java
+++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java
@@ -281,10 +281,18 @@ public final class PackageRelationshipCollection implements Iterable<PackageRela
}
/**
- * Get the numbe rof relationships in the collection.
+ * Get the number of relationships in the collection.
*/
public int size() {
- return relationshipsByID.values().size();
+ return relationshipsByID.size();
+ }
+
+ /**
+ * Is this collection empty?
+ * @since POI 5.2.0
+ */
+ public boolean isEmpty() {
+ return relationshipsByID.isEmpty();
}
/**