T
- the type of object to store the revision numbers withpublic class Revisions<T>
extends java.lang.Object
Constructor | Description |
---|---|
Revisions() |
Modifier and Type | Method | 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.
|
java.lang.String |
toString() |
public T getObject(int index) throws java.lang.IndexOutOfBoundsException
index
- the positionjava.lang.IndexOutOfBoundsException
- if the index is out of rangepublic int getRevisionNumber(int index) throws java.lang.IndexOutOfBoundsException
index
- the positionjava.lang.IndexOutOfBoundsException
- 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()
public java.lang.String toString()
toString
in class java.lang.Object