T - Type of the object in this list.java.lang.Iterable<T>DiffListByArrayList, DiffListBySkipListpublic interface DiffList<T extends java.lang.Comparable<java.lang.Integer>>
extends java.lang.Iterable<T>
| Modifier and Type | Field | Description |
|---|---|---|
static DiffList |
EMPTY_LIST |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addFirst(T t) |
Adds an element at the beginning of the list.
|
boolean |
addLast(T t) |
Adds an element at the end of the list.
|
int |
binarySearch(int key) |
Searches the list for the specified object using the binary
search algorithm.
|
static <T extends java.lang.Comparable<java.lang.Integer>> |
emptyList() |
Returns an empty DiffList.
|
T |
get(int index) |
Returns the element at the specified position in this list.
|
java.util.List<T> |
getMinListForRange(int startIndex,
int endIndex,
INodeDirectory dir) |
Returns the list of minimal list of elements need to combine to generate
cumulative sum from startIndex to endIndex.
|
boolean |
isEmpty() |
Returns true if this list contains no elements.
|
T |
remove(int index) |
Removes the element at the specified position in this list.
|
int |
size() |
Returns the number of elements in this list.
|
static <T extends java.lang.Comparable<java.lang.Integer>> |
unmodifiableList(DiffList<T> diffs) |
Returns an unmodifiable diffList.
|
static final DiffList EMPTY_LIST
static <T extends java.lang.Comparable<java.lang.Integer>> DiffList<T> emptyList()
static <T extends java.lang.Comparable<java.lang.Integer>> DiffList<T> unmodifiableList(DiffList<T> diffs)
T - Type of the object in the the diffListdiffs - DiffListT get(int index)
index - index of the element to returnjava.lang.IndexOutOfBoundsException - if the index is out of range
(index < 0 || index >= size())boolean isEmpty()
int size()
T remove(int index)
index - the index of the element to be removedboolean addLast(T t)
t - element to be appended to this listvoid addFirst(T t)
t - element to be added to this listint binarySearch(int key)
key - key to be searched forjava.util.List<T> getMinListForRange(int startIndex, int endIndex, INodeDirectory dir)
startIndex - endIndex - Copyright © 2008–2025 Apache Software Foundation. All rights reserved.