Top Fields Constructors Methods
org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure

public Class Revisions<T>

extends Object
Class Inheritance
Type Parameters
<T>
the type of object to store the revision numbers with
Imports
java.util.ArrayList, .List, .StringJoiner

Author
Johannes Koch

Field Summary

Modifier and TypeField and Description
private List<T>
private List<Integer>

Constructor Summary

AccessConstructor and Description
public
Revisions()

Constructor.

Method Summary

Modifier and TypeMethod and Description
public void
addObject(T
the object
object
,
int
the revision number
revisionNumber
)

Adds an object with a specified revision number.

public T

Returns:

the object
getObject
(int
the position
index
)

Returns the object at the specified position.

private List<T>
public int

Returns:

the revision number
getRevisionNumber
(int
the position
index
)

Returns the revision number at the specified position.

private List<Integer>
protected void
setRevisionNumber(T
the object
object
,
int
the revision number
revisionNumber
)

Sets the revision number of a specified object.

public int

Returns:

the size
size
()

Returns the size.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

objectsback to summary
private List<T> objects
revisionNumbersback to summary
private List<Integer> revisionNumbers

Constructor Detail

Revisionsback to summary
public Revisions()

Constructor.

Method Detail

addObjectback to summary
public void addObject(T object, int revisionNumber)

Adds an object with a specified revision number.

Parameters
object:T

the object

revisionNumber:int

the revision number

getObjectback to summary
public T getObject(int index)

Returns the object at the specified position.

Parameters
index:int

the position

Returns:T

the object

Exceptions
IndexOutOfBoundsException:
if the index is out of range
getObjectsback to summary
private List<T> getObjects()
getRevisionNumberback to summary
public int getRevisionNumber(int index)

Returns the revision number at the specified position.

Parameters
index:int

the position

Returns:int

the revision number

Exceptions
IndexOutOfBoundsException:
if the index is out of range
getRevisionNumbersback to summary
private List<Integer> getRevisionNumbers()
setRevisionNumberback to summary
protected void setRevisionNumber(T object, int revisionNumber)

Sets the revision number of a specified object.

Parameters
object:T

the object

revisionNumber:int

the revision number

sizeback to summary
public int size()

Returns the size.

Returns:int

the size

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override