Top Description Inners Fields Constructors Methods
org.eclipse.jgit.revwalk

public Class RevObjectList<E extends RevObject>

extends AbstractList<E extends RevObject>
Class Inheritance
Known Direct Subclasses
org.eclipse.jgit.revwalk.RevCommitList
Type Parameters
<E>
type of subclass of RevObject the list is storing.
Imports
java.text.MessageFormat, java.util.AbstractList, org.eclipse.jgit.internal.JGitText

An ordered list of org.eclipse.jgit.revwalk.RevObject subclasses.

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class
RevObjectList.Block

One level of contents, either an intermediate level or a leaf level.

Field Summary

Modifier and TypeField and Description
pack-priv static final int
pack-priv static final int
protected RevObjectList.Block
contents

Items stored in this list.

protected int
size

Current number of elements in the list.

Inherited from java.util.AbstractList:
modCount

Constructor Summary

AccessConstructor and Description
public
RevObjectList()

Create an empty object list.

Method Summary

Modifier and TypeMethod and Description
public void
add(int
index at which the specified element is to be inserted
index
,
E
element to be inserted
element
)

Overrides java.util.AbstractList.add.

Implements java.util.List.add.

Inserts the specified element at the specified position in this list (optional operation).

public void
clear()

Overrides java.util.AbstractList.clear.

Implements java.util.List.clear, java.util.Collection.clear.

Removes all of the elements from this list (optional operation).

public E
get(int
index of the element to return
index
)

Implements abstract java.util.AbstractList.get.

Implements java.util.List.get.

Returns the element at the specified position in this list.

public E
set(int
index of the element to replace
index
,
E
element to be stored at the specified position
element
)

Overrides java.util.AbstractList.set.

Implements java.util.List.set.

Replaces the element at the specified position in this list with the specified element (optional operation).

public int
size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Returns the number of elements in this list.

Inherited from java.util.AbstractList:
addaddAllequalshashCodeindexOfiteratorlastIndexOflistIteratorlistIteratorremoveremoveRangesubList

Field Detail

BLOCK_SHIFTback to summary
pack-priv static final int BLOCK_SHIFT
BLOCK_SIZEback to summary
pack-priv static final int BLOCK_SIZE
contentsback to summary
protected RevObjectList.Block contents

Items stored in this list.

If Block#shift = 0 this block holds the list elements; otherwise it holds pointers to other Block instances which use a shift that is BLOCK_SHIFT smaller.

sizeback to summary
protected int size

Current number of elements in the list.

Constructor Detail

RevObjectListback to summary
public RevObjectList()

Create an empty object list.

Method Detail

addback to summary
public void add(int index, E element)

Overrides java.util.AbstractList.add.

Implements java.util.List.add.

Doc from java.util.AbstractList.add.

Inserts the specified element at the specified position in this list (optional operation). Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).

Parameters
index:int

Doc from java.util.List.add.

index at which the specified element is to be inserted

element:E

Doc from java.util.List.add.

element to be inserted

Annotations
@Override
clearback to summary
public void clear()

Overrides java.util.AbstractList.clear.

Implements java.util.List.clear, java.util.Collection.clear.

Doc from java.util.AbstractList.clear.

Removes all of the elements from this list (optional operation). The list will be empty after this call returns.

Annotations
@Override
getback to summary
public E get(int index)

Implements abstract java.util.AbstractList.get.

Implements java.util.List.get.

Doc from java.util.AbstractList.get.

Returns the element at the specified position in this list.

Parameters
index:int

Doc from java.util.List.get.

index of the element to return

Returns:E

Doc from java.util.List.get.

the element at the specified position in this list

Annotations
@Override
@SuppressWarnings:unchecked
setback to summary
public E set(int index, E element)

Overrides java.util.AbstractList.set.

Implements java.util.List.set.

Doc from java.util.AbstractList.set.

Replaces the element at the specified position in this list with the specified element (optional operation).

Parameters
index:int

Doc from java.util.List.set.

index of the element to replace

element:E

Doc from java.util.List.set.

element to be stored at the specified position

Returns:E

Doc from java.util.List.set.

the element previously at the specified position

Annotations
@Override
@SuppressWarnings:unchecked
sizeback to summary
public int size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Doc from java.util.List.size.

Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Returns:int

the number of elements in this list

Annotations
@Override
org.eclipse.jgit.revwalk back to summary

protected Class RevObjectList.Block

extends Object
Class Inheritance

One level of contents, either an intermediate level or a leaf level.

Field Summary

Modifier and TypeField and Description
pack-priv final Object[]
pack-priv final int

Constructor Summary

AccessConstructor and Description
pack-priv
Block(int s)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contentsback to summary
pack-priv final Object[] contents
shiftback to summary
pack-priv final int shift

Constructor Detail

Blockback to summary
pack-priv Block(int s)