T
- the type of object to store the revision numbers withpublic class Revisions<T> extends Object
Constructor and Description |
---|
Revisions() |
Modifier and Type | Method and Description |
---|---|
void |
addObject(T object,
int revisionNumber)
Adds an object with a specified revision number.
|
T |
getObject(int index)
Returns the object at the specified position.
|
int |
getRevisionNumber(int index)
Returns the revision number at the specified position.
|
protected void |
setRevisionNumber(T object,
int revisionNumber)
Sets the revision number of a specified object.
|
int |
size()
Returns the size.
|
String |
toString() |
public T getObject(int index)
index
- the positionIndexOutOfBoundsException
- if the index is out of rangepublic int getRevisionNumber(int index)
index
- the positionIndexOutOfBoundsException
- if the index is out of rangepublic void addObject(T object, int revisionNumber)
object
- the objectrevisionNumber
- the revision numberprotected void setRevisionNumber(T object, int revisionNumber)
object
- the objectrevisionNumber
- the revision numberpublic int size()
Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.