Package org.apache.pdfbox.cos
Class COSIncrement
- java.lang.Object
-
- org.apache.pdfbox.cos.COSIncrement
-
- All Implemented Interfaces:
java.lang.Iterable<COSBase>
public class COSIncrement extends java.lang.Object implements java.lang.Iterable<COSBase>
ACOSIncrementstarts at a givenCOSUpdateInfoto collect updates, that have been made to aCOSDocumentand therefore should be added to itīs next increment.- Author:
- Christian Appl
- See Also:
COSUpdateState,COSUpdateInfo
-
-
Constructor Summary
Constructors Constructor Description COSIncrement(COSUpdateInfo incrementOrigin)Creates a newCOSIncrementfor the givenCOSUpdateInfo, the increment will use itīsCOSDocumentStateas itīs own origin and shall collect all updates contained in the givenCOSUpdateInfo.
Should the given object benull, the resulting increment shall be empty.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(COSBase base)COSIncrementexclude(COSBase... base)The givenCOSBases are not fit for inclusion in an increment and shall be added toexcluded.
nullvalues shall be ignored.java.util.Set<COSBase>getObjects()java.util.Iterator<COSBase>iterator()Return an iterator for the determinedobjectscontained in thisCOSIncrement.
-
-
-
Constructor Detail
-
COSIncrement
public COSIncrement(COSUpdateInfo incrementOrigin)
Creates a newCOSIncrementfor the givenCOSUpdateInfo, the increment will use itīsCOSDocumentStateas itīs own origin and shall collect all updates contained in the givenCOSUpdateInfo.
Should the given object benull, the resulting increment shall be empty.- Parameters:
incrementOrigin- TheCOSUpdateInfoserving as an update source for thisCOSIncrement.
-
-
Method Detail
-
contains
public boolean contains(COSBase base)
- Parameters:
base- TheCOSBaseto check.- Returns:
trueif the givenCOSBaseis already known to and has been processed by thisCOSIncrement.- See Also:
objects,processedObjects
-
exclude
public COSIncrement exclude(COSBase... base)
The givenCOSBases are not fit for inclusion in an increment and shall be added toexcluded.
nullvalues shall be ignored.- Parameters:
base- TheCOSBases to add toexcluded.- Returns:
- The
COSIncrementitself, to allow method chaining. - See Also:
excluded
-
getObjects
public java.util.Set<COSBase> getObjects()
-
iterator
public java.util.Iterator<COSBase> iterator()
Return an iterator for the determinedobjectscontained in thisCOSIncrement.- Specified by:
iteratorin interfacejava.lang.Iterable<COSBase>- Returns:
- An iterator for the determined
objectscontained in thisCOSIncrement.
-
-