* recognize a part with a part name derived from another part name by
* appending segments to it.
*
+ * @param partName name of part
+ * @param part part to put
+ * @return the previous value associated with {@code partName}, or
+ * {@code null} if there was no mapping for {@code partName}.
* @exception InvalidOperationException
* Throws if you try to add a part with a name derived from
* another part name.
/**
* The values themselves should be returned in sorted order. Doing it here
* avoids paying the high cost of Natural Ordering per insertion.
+ * @return unmodifiable collection of parts
*/
public Collection<PackagePart> sortedValues() {
return Collections.unmodifiableCollection(packagePartLookup.values());
* case-insensitive ASCII strings. Packages shall not contain equivalent
* part names and package implementers shall neither create nor recognize
* packages with equivalent part names. [M1.12]
+ *
+ * @param obj1 first {@code PackagePartName} to compare
+ * @param obj2 second {@code PackagePartName} to compare
+ * @return a negative integer, zero, or a positive integer as the first argument is less than,
+ * equal to, or greater than the second.
*/
public static int compare(PackagePartName obj1, PackagePartName obj2) {
return compare (
* For example, this sorts "file10.png" after "file2.png" (comparing the
* numerical portion), but sorts "File10.png" before "file2.png"
* (lexigraphical sort)
+ *
+ * @param str1 first string to compare
+ * @param str1 second string to compare
+ * @return a negative integer, zero, or a positive integer as the first argument is less than,
+ * equal to, or greater than the second.
*/
public static int compare(final String str1, final String str2)
{