public final class PackagePartCollection
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
PackagePartCollection() |
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(PackagePartName partName) |
PackagePart |
get(PackagePartName partName) |
int |
getUnusedPartIndex(java.lang.String nameTemplate)
Get an unused part index based on the namePattern, which doesn't exist yet
and has the lowest positive index
|
PackagePart |
put(PackagePartName partName,
PackagePart part)
Check rule [M1.11]: a package implementer shall neither create nor
recognize a part with a part name derived from another part name by
appending segments to it.
|
PackagePart |
remove(PackagePartName key) |
int |
size() |
java.util.Collection<PackagePart> |
sortedValues()
The values themselves should be returned in sorted order.
|
public PackagePart put(PackagePartName partName, PackagePart part)
partName
- name of partpart
- part to putpartName
, or
null
if there was no mapping for partName
.InvalidOperationException
- Throws if you try to add a part with a name derived from
another part name.public PackagePart remove(PackagePartName key)
public java.util.Collection<PackagePart> sortedValues()
public boolean containsKey(PackagePartName partName)
public PackagePart get(PackagePartName partName)
public int size()
public int getUnusedPartIndex(java.lang.String nameTemplate) throws InvalidFormatException
nameTemplate
- The template for new part names containing a '#'
for the index,
e.g. "/ppt/slides/slide#.xml"InvalidFormatException
- if the nameTemplate is null or doesn't contain
the index char (#) or results in an invalid part nameCopyright 2022 The Apache Software Foundation or its licensors, as applicable.