Author: fanningpj
Date: Thu Dec 30 01:25:20 2021
New Revision: 1896521

URL: http://svn.apache.org/viewvc?rev=1896521&view=rev
Log:
add isEmpty() method

Modified:
    
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java

Modified: 
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java?rev=1896521&r1=1896520&r2=1896521&view=diff
==============================================================================
--- 
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java
 (original)
+++ 
poi/trunk/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java
 Thu Dec 30 01:25:20 2021
@@ -281,10 +281,18 @@ public final class PackageRelationshipCo
     }
 
     /**
-     * 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();
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to