T
- Type of the object in this list.public interface DiffList<T extends Comparable<Integer>> extends Iterable<T>
Modifier and Type | Field and Description |
---|---|
static DiffList |
EMPTY_LIST |
Modifier and Type | Method and 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 Comparable<Integer>> |
emptyList()
Returns an empty DiffList.
|
T |
get(int index)
Returns the element at the specified position in this list.
|
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 Comparable<Integer>> |
unmodifiableList(DiffList<T> diffs)
Returns an unmodifiable diffList.
|
forEach, iterator, spliterator
static final DiffList EMPTY_LIST
static <T extends Comparable<Integer>> DiffList<T> emptyList()
static <T extends Comparable<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 returnIndexOutOfBoundsException
- 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 forList<T> getMinListForRange(int startIndex, int endIndex, INodeDirectory dir)
startIndex
- endIndex
- Copyright © 2008–2019 Apache Software Foundation. All rights reserved.