T - Type of the object in the listjava.lang.Iterable<T>, DiffList<T>public class DiffListByArrayList<T extends java.lang.Comparable<java.lang.Integer>> extends java.lang.Object implements DiffList<T>
EMPTY_LIST| Constructor | Description |
|---|---|
DiffListByArrayList(int initialCapacity) |
| 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 i) |
Searches the list for the specified object using the binary
search algorithm.
|
T |
get(int i) |
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.
|
java.util.Iterator<T> |
iterator() |
|
T |
remove(int i) |
Removes the element at the specified position in this list.
|
int |
size() |
Returns the number of elements in this list.
|
public T get(int i)
DiffListpublic boolean isEmpty()
DiffListpublic int size()
DiffListpublic T remove(int i)
DiffListpublic boolean addLast(T t)
DiffListpublic void addFirst(T t)
DiffListpublic int binarySearch(int i)
DiffListbinarySearch in interface DiffList<T extends java.lang.Comparable<java.lang.Integer>>i - key to be searched forpublic java.util.Iterator<T> iterator()
iterator in interface java.lang.Iterable<T extends java.lang.Comparable<java.lang.Integer>>public java.util.List<T> getMinListForRange(int startIndex, int endIndex, INodeDirectory dir)
DiffListgetMinListForRange in interface DiffList<T extends java.lang.Comparable<java.lang.Integer>>Copyright © 2008–2025 Apache Software Foundation. All rights reserved.